W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2006

[Bug 3446] [XQueryX] constructing attribute values with whitespace characters

From: <bugzilla@wiggum.w3.org>
Date: Tue, 11 Jul 2006 15:02:04 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1G0JkS-0000dw-Qr@wiggum.w3.org>

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

           Summary: [XQueryX] constructing attribute values with whitespace
                    characters
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQueryX
        AssignedTo: jim.melton@acm.org
        ReportedBy: andrew.eisenberg@us.ibm.com
         QAContact: public-qt-comments@w3.org


I might want to construct an XQueryX instance that is equivalent to the
following XQuery:

<elem attr="a&#x09;b"></elem>

I can try to do this with the following:

<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:queryBody>
      <xqx:elementConstructor>
        <xqx:tagName>elem</xqx:tagName>
        <xqx:attributeList>
          <xqx:attributeConstructor>
            <xqx:attributeName>attr</xqx:attributeName>
            <xqx:attributeValue>a&#x09;b</xqx:attributeValue>
          </xqx:attributeConstructor>
        </xqx:attributeList>
      </xqx:elementConstructor>
    </xqx:queryBody>
  </xqx:mainModule>
</xqx:module>

The XQueryX stylesheet turns this into the following:

<elem attr="a   b"></elem>

This XQuery will not produce the same result as the XQuery that I desire.

When I use "a&amp;#x09;b" for the attribute value, then the stylesheet produces
the following:

<elem attr="a&amp;#x09;b"></elem>

Again, not what I desire.

This issue applies to all of the whitespace characters, #x09;, #x0a;, and
#x0d;.

Do we need additional markup in order to preserve char refs such as these?
Something like the following:

<xqx:attributeValue>a<xqx:charRefHex>09</xqx:charRefHex>b</xqx:attributeValue>
Received on Tuesday, 11 July 2006 15:02:39 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:29 UTC