This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2257 - [xqueryx] brace groups in element content.
Summary: [xqueryx] brace groups in element content.
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQueryX 1.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Jim Melton
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-16 11:06 UTC by David Carlisle
Modified: 2005-09-26 22:51 UTC (History)
0 users

See Also:


Attachments

Description David Carlisle 2005-09-16 11:06:28 UTC
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:if>
      <xsl:apply-templates select="."/>
      <xsl:if test="not(self::xqx:elementConstructor)">
        <xsl:value-of select="$RBRACE"/>
      </xsl:if>
  </xsl:for-each>
  </xsl:template>


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>


but


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

evaluates to

 <y><z/></y>

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.

David
Comment 1 Jim Melton 2005-09-20 09:57:07 UTC
Thanks for reporting this problem.  We will investigate it and produce a
solution for a revised XQueryX stylesheet. 
Comment 2 Jim Melton 2005-09-26 21:11:36 UTC
We have made the change that you proposed. 

Please let us know if you agree with this resolution of your issue, by adding a
comment to the issue record and changing the Status of the issue to Closed. Or,
if you do not agree with this resolution, please add a comment explaining why.
If you wish to appeal the WG's decision to the Director, then also change the
Status of the record to Reopened. If you wish to record your dissent, but do not
wish to appeal the decision to the Director, then change the Status of the
record to Closed. If we do not hear from you in the next two weeks, we will
assume you agree with the WG decision.
Comment 3 David Carlisle 2005-09-26 22:51:27 UTC
thanks