Re: Parsing XML files as text with collection()

Chapman Flack <chap-JULfBfA8satPFr4CO1/[email protected]> Sat, 10 Oct 2020 10:15:07 -0400
Newsgroups gmane.text.xml.saxon.help
Message-ID <[email protected]>
Hmm ... where do ? globs work that way?

Windows, maybe? according to https://ss64.com/nt/syntax-wildcards.html

It looks like it mostly only matches exactly one character, except that
it will match at the very end of the name or extension component of a
filename. I suspect the description there is literally true, and they
simply hadn't prevented it from matching a terminating NUL as a character.

Regards,
-Chap


On 10/10/20 05:11, Michael Kay wrote:
> I suspect the history here is that I implemented "?" as ".?" because that's the meaning I grew up with and forgot that UNIX globs were different, and then when I disccovered the discrepancy, decided to leave it in the interests of compatibility.
> 
> Michael Kay
> Saxonica
> 
>> On 9 Oct 2020, at 22:34, Chapman Flack <chap-JULfBfA8satPFr4CO1/[email protected]> wrote:
>>
>> Tangentially, I just took a look at the documentation for this, and saw
>>
>> https://www.saxonica.com/html/documentation/sourcedocs/collections/
>>
>> More generally, the pattern is converted to a regular expression by
>> prepending "^", appending "$", replacing "." by "\.", "*" by ".*",
>> and "?" by ".?"
>>
>> Is that a typo? I would think the regex equivalent of glob "?" to be
>> simply "." and not ".?".