- From: C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com>
- Date: Tue, 21 Jun 2016 09:02:03 -0600
- To: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>
- Cc: Public Joint XSLT XQuery XPath <public-xsl-query@w3.org>
On Jun 20, 2016, at 8:18 PM, C. M. Sperberg-McQueen wrote:
> ...
>> ACTION A-645-07: MSM to prepare a schema with a workaround for the
>> issue reported in bug 29658 and post it.
>>
>> Status: Pending; ETA 2016-06-21
> ...
> 3 The current schema prohibits whitespace within a URIQualifiedName,
> e.g. it makes "Q {http://example.com/nss/foo} bar" and "Q {
> http://example.com/nss/foo } bar" and similar variations illegal as
> EQNames.
>
> I think the whitespace rules of XPath say that this should be legal,
> since the grammar given in XPath is
>
> [117] URIQualifiedName ::= BracedURILiteral NCName
> [118] BracedURILiteral ::= "Q" "{" [^{}]* "}"
>
> and neither rule carries the /* ws:explicit */ annotation.
>
> So the new schema makes these values legal.
It occurs to me, getting ready for the call, that in fact comments
are also allowed between tokens where ws:explicit is not flagged.
So instead of \s* between tokens, the pattern on EQName should
probably be something like (\s|\(:([^:]|:[^\)])*:\))*.
Of course, since XPath comments can nest, they cannot be
represented accurately with a regular expression. But we can
write a regular expression that allows comments with no nested
comments (as just given), or comments which nest up to two or
three or ... n deep.
Unless the WG disagrees, I will propose to develop a regular
expression pattern which correctly matches comments up to
three deep, and use it in the schema. That will require more
test cases, of course.
Michael
--
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
****************************************************************
Received on Tuesday, 21 June 2016 15:02:32 UTC