W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2005

[Bug 2258] [xqueryx] XQueryX fragments

From: <bugzilla@wiggum.w3.org>
Date: Fri, 16 Sep 2005 11:30:05 +0000
To: public-qt-comments@w3.org
Message-Id: <E1EGEPt-00062q-RF@wiggum.w3.org>


           Summary: [xqueryx]  XQueryX fragments
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQueryX
        AssignedTo: jim.melton@acm.org
        ReportedBy: davidc@nag.co.uk
         QAContact: public-qt-comments@w3.org

Should XQueryX allow documents that have top level element something
other than xqx:Module?

In Xquery it is clear that 1 is a valid expression and [1] is not, even
though it matches the production Predicate, as the Xquery EBNF has a
specified start production, and it is not possible to parse [1] starting
from Module. Unfortunately XSD schema can not specify a starting (top
level) element.

It would be possible to restrict the top level elements by making all
other element declarations local, but that would badly disrupt the
current mechanisms of using substitution groups which can only refer to
globally defined eleemnts.

However an alternative would be to make this restriction in the

<xsl:template match="/*">
 <xsl:message terminate="yes">don't do that</xsl:message>

<xsl:template match="/xqx:module" priority="2">

Without such a restriction there are several examples of documents that
are valid against the xqueryx schema, and generate valid xquery
expressions when processed with the stylesheet, but which have rather
unfortunate meanings.


This is
and selects an element of that name, despite using xqx:atomicType

<xqx:resultExpr xmlns:xqx="http://www.w3.org/2005/XQueryX">

this is 
so the resultExpr element isn't restricted to typeswitch (it's intended


<xqx:attributeList xmlns:xqx="http://www.w3.org/2005/XQueryX">

this doesn't construct attributes, but is instead
which tests if the child element x is equal to the string "y"

there are other examples, but these are all of the same basic type and
would all be fixed if XqueryX documents were not allowed to start at
arbitrary elements.
Received on Friday, 16 September 2005 11:30:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:08 UTC