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

[Bug 2257] [xqueryx] brace groups in element content.

From: <bugzilla@wiggum.w3.org>
Date: Fri, 16 Sep 2005 11:06:30 +0000
To: public-qt-comments@w3.org
Message-Id: <E1EGE34-0005G9-5H@wiggum.w3.org>


           Summary: [xqueryx]  brace groups in element content.
           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

Currently (15th september)
the stylesheet puts a brace group around each item in the content
of a direct element constructor. It should not do this if the item is itself a
direct element constructor, ie the xsl:if tests below should be added.

  <xsl:template match="xqx:elementContent">
    <xsl:for-each select="*">
      <xsl:if test="not(self::xqx:elementConstructor)">
         <xsl:value-of select="$LBRACE"/>
      <xsl:apply-templates select="."/>
      <xsl:if test="not(self::xqx:elementConstructor)">
        <xsl:value-of select="$RBRACE"/>

Without this change XqueryX can not express the equivalent of
<y><z xmlns:a="a"/></y>
the nearest it can get is
<y>{<z xmlns:a="a"/>}</y>

But these are not equivalent:

  declare copy-namespaces no-preserve,no-inherit;
  <y><z xmlns:a="a"/></y>

evaluates to

 <y><z xmlns:a="a"/></y>


  declare copy-namespaces no-preserve,no-inherit;
  <y>{<z xmlns:a="a"/>}</y>

evaluates to


as the copy-namespace declaration has no effect on the directly embedded
element constructor in the first example, but does affect (prohibit)
the copying of the namespace when the sequence constructed by the
enclosed expression is copied in the second example.

Received on Friday, 16 September 2005 11:06:38 UTC

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