I am new to XPath/XQuery, so please forgive my ignorance. I am caught between multiple interpretations of XPath/XQuery StringLiteral that are causing be development difficulties. I have an XML element that contains an entity (e.g. <Railroad>B&O</Railroad>), and I am trying to find that element using two different tools. In one tool, Java/Jaxen, I must use a predicate of the form [. = 'B&O'] to select the node. In another tool, NeoCore XMS I must use a predicate of the form [. = 'B&O'] to select the node. Finally, I have found that the Mark Logic XQuery engine will accept either predicate phrasing and return the desired node. I have examined the EBNF for XPath 1.0, XPath 2.0 (Draft), and XQuery 1.0 (Draft). For the two XPath specs, the EBNF for StringLiteral is: ('"' (('"' '"') | [^"])* '"') | ("'" (("'" "'") | [^'])* "'") The XQuery EBNF is: ('"' (PredefinedEntityRef | CharRef | ('"' '"') | [^"&])* '"') | ("'" (PredefinedEntityRef | CharRef | ("'" "'") | [^'&])* "'") Should the XPath 2.0 and XQuery 1.0 EBNF for StringLiteral be identical? Which of my three tools (Jaxen, NeoCore, MarkLogic) is implementing the target spec correctly? From a developers perspective, it seems as though the Mark Logic implmentation is the ideal behavior since I don't have to expand entities to entity references before submitting my query. Thanks in advance, Steve CondasReceived on Tuesday, 5 October 2004 19:03:02 UTC
This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:43:43 UTC