Hi Folks,

First of all I would like to wish a merry Christmas to you all. Hope
everyone is having a great time. :)

And now to the business. I have encountered a couple of issues in the XPath
2.0 grammar for type alternatives specified in the XML Schema 1.1 Structures
specification. I would like to have some comments regarding them.

1. According to the grammar '<' is a valid character in the subset of
allowed XPath expressions. But it seems to violate a restriction in the XML
1.0 specification. The XML 1.0 spec says;

[10]   AttValue   ::=   '"' ([^<&"] |
Reference<file:///home/hiranya/Documents/xsdl-specs/Extensible%20Markup%20Language%20%28XML%29%201.0%20%28Fifth%20Edition%29.html#NT-Reference>)*
'"'


|  "'" ([^<&'] |
Reference<file:///home/hiranya/Documents/xsdl-specs/Extensible%20Markup%20Language%20%28XML%29%201.0%20%28Fifth%20Edition%29.html#NT-Reference>)*
"'"
So it seems '<' is not a valid character for an attribute value. But in type
alternatives, test expressions are specified as attribute values. Because of
this restriction when a type alternative is specified with the '<' character
(eg: @attr < 5) the parser throws a fatal error.

2. The grammar defines a lexical unit called the ValueExpr.

[14]   ValueExpr   ::=
*SimpleValue*<file:///home/hiranya/Documents/xsdl-specs/W3C%20XML%20Schema%20Definition%20Language%20%28XSD%29%201.1%20Part%201%3A%20Structures.html#ta-SimpleValue>|
*ConstructorFunction*<file:///home/hiranya/Documents/xsdl-specs/W3C%20XML%20Schema%20Definition%20Language%20%28XSD%29%201.1%20Part%201%3A%20Structures.html#ta-ConstructorFunction>
But none of the other productions refer it. Hence there is no real meaning
in having this production. This was pointed out to me by Khaled a few months
back as well.

WDYT?

Thanks

Best Regards,
Hiranya

Reply via email to