This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The XqueryX schema has the following structure (without the added comment) <xsd:element name="prolog"> <xsd:complexType> <xsd:sequence> <xsd:choice minOccurs="0" maxOccurs="unbounded"> <xsd:element ref="defaultCollationDecl"/> <xsd:element ref="baseUriDecl"/> <xsd:element ref="constructionDecl"/> <xsd:element ref="orderingModeDecl"/> <xsd:element ref="emptyOrderingDecl"/> <xsd:element ref="copyNamespacesDecl"/> <!-- </xsd:choice> <xsd:choice minOccurs="0" maxOccurs="unbounded"> --> <xsd:element ref="defaultNamespaceDecl"/> <xsd:element ref="namespaceDecl"/> <xsd:element ref="schemaImport"/> <xsd:element ref="moduleImport"/> </xsd:choice> <xsd:choice minOccurs="0" maxOccurs="unbounded"> <xsd:element ref="varDecl"/> <xsd:element ref="functionDecl"/> <xsd:element ref="optionDecl"/> </xsd:choice> </xsd:sequence> </xsd:complexType> </xsd:element> This forces (for example) copyNamespacesDecl to come before defaultNamespaceDecl and corresponds to some early drafts of the XQuery EBNF in which the "Setter" Production was restricted to appearing earlier in the prolog. In the current CR EBNF though ,the Setter production is merged in to the choice group ((DefaultNamespaceDecl | Setter | NamespaceDecl | Import) Separator)* so they may be mixed in any order. Restricting the order in XQueryX (slightly) complicates an XQuery to XQueryX translator as it needs to re-order the elements and (more seriously) it complicates checking that round-tripping has worked, as expressions need to be reordered. Deleteting the two lines that are commented out in the above schena sample would not invalidate any current XQueryX files and would simplify the correspondence between XQuery and XQueryX. Sorry this comment is late but it was triggered by Xquery Test Suite 0.9 which has some examples of Prolog statements in orders not allowed by this schema. (I ammended my translator to sort the expressions before writing out XQueryX so the latest version of xq2xqx does not need the change suggested here, but if the change were made, I would remove the expression re-ordering from xq2xqx which would simplify the round-trip testing. David
Thanks for your comment. I agree with the comment and proposed solution, and will propose to the XML Query WG that it be adopted.
Created attachment 432 [details] XML Schema for XQueryX This attachment contains the XML Schema that defines XQueryX, current with all Bugzilla bug solutions implemented as of 2006-06-13.
Created attachment 433 [details] XSLT stylesheet for XQueryX This attachment contains the XSLT Stylesheet that defines the semantics of XQueryX by transforming it to XQuery, current with all Bugzilla bug solutions implemented as of 2006-06-13.
Thanks for your ongoing interest in this issue and for your proposed solution. The XML Query WG agreed with that solution and has approved its inclusion into the XQueryX specification. Since we have adopted your solution, we assume that your concerns are satisfied. I have marked this bug FIXED and request that you mark it CLOSED at your earliest convenience. In the interests of ensuring that the entire community has access to the most current version of the XQueryX schema and stylesheet, I am attaching both of those as responses to this bug.
looks fine thanks, I've reverted xq2xqx not to need the re-ordering and everything seems fine with the new schema.