[Bug 2290] [XQueryX] Use of ./text()

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

           Summary: [XQueryX] Use of ./text()
           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: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


The XQueryX stylesheet makes frequent use of constructs like:

<xsl:value-of select="xqx:value/text()"/>

This produces incorrect results if xqx:value contains comments or processing
instructions. Since there's no intrinsic reason to ban comments and PIs (and
nothing in the spec that says they are banned), it's better practice to use

<xsl:value-of select="xqx:value"/>

Michael Kay

Received on Thursday, 22 September 2005 16:55:43 UTC