[Bug 3474] XQueryX] constructing attribute values with the less than character

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

           Summary: XQueryX] constructing attribute values with the less
                    than character
           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="&amp;&lt;&gt;"></elem>

I can try to do this with the following:

<?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:queryBody>
      <xqx:elementConstructor>
        <xqx:tagName>elem</xqx:tagName>
        <xqx:attributeList>
          <xqx:attributeConstructor>
            <xqx:attributeName>attr</xqx:attributeName>
            <xqx:attributeValue>&amp;&lt;&gt;</xqx:attributeValue>
          </xqx:attributeConstructor>
        </xqx:attributeList>
      </xqx:elementConstructor>
    </xqx:queryBody>
  </xqx:mainModule>
</xqx:module>

The XQueryX stylesheet turns this into the following:

<elem attr="&amp;<>"></elem>

This is not well-formed XML. Either attr="&amp;&lt;>" or attr="&amp;&lt;&gt;"
should be produced.

Received on Monday, 17 July 2006 22:09:35 UTC