[Bug 4869] [FS] Enclosed expressions and namespaces

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4869





------- Comment #4 from tim@cbcl.co.uk  2007-07-30 14:32 -------
The XQueryX from XQTS (1.0.3 dev) is below.  I can't quite see how XQueryX
should be used to distinguish the two forms, unless the enclosed element b is
represented as a computed element constructor.  Could you please comment?

<?xml version="1.0"?>
<xqx:module xmlns:xqx="http://www.w3.org/2005/XQueryX"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.w3.org/2005/XQueryX
                                http://www.w3.org/2005/XQueryX/xqueryx.xsd">

  <xqx:mainModule>
    <xqx:prolog>
      <xqx:copyNamespacesDecl>
        <xqx:preserveMode>no-preserve</xqx:preserveMode>
        <xqx:inheritMode>inherit</xqx:inheritMode>
      </xqx:copyNamespacesDecl>
    </xqx:prolog>
    <xqx:queryBody>
      <xqx:elementConstructor>
        <xqx:tagName>doc</xqx:tagName>
        <xqx:elementContent>

          <xqx:elementConstructor>
            <xqx:tagName>a</xqx:tagName>
            <xqx:elementContent>
              <xqx:elementConstructor>
                <xqx:tagName>b</xqx:tagName>
                <xqx:attributeList>
                  <xqx:namespaceDeclaration>
                    <xqx:prefix>p</xqx:prefix>
                    <xqx:uri>q</xqx:uri>
                  </xqx:namespaceDeclaration>
                </xqx:attributeList>
              </xqx:elementConstructor>
            </xqx:elementContent>
          </xqx:elementConstructor>

          <xqx:elementConstructor>
            <xqx:tagName>a</xqx:tagName>
            <xqx:elementContent>
              <xqx:elementConstructor>
                <xqx:tagName>b</xqx:tagName>
                <xqx:attributeList>
                  <xqx:namespaceDeclaration>
                    <xqx:prefix>p</xqx:prefix>
                    <xqx:uri>q</xqx:uri>
                  </xqx:namespaceDeclaration>
                </xqx:attributeList>
              </xqx:elementConstructor>
            </xqx:elementContent>
          </xqx:elementConstructor>

        </xqx:elementContent>
      </xqx:elementConstructor>
    </xqx:queryBody>
  </xqx:mainModule>
</xqx:module>

Received on Monday, 30 July 2007 14:32:48 UTC