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

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

From: <bugzilla@wiggum.w3.org>
Date: Thu, 22 Sep 2005 16:55:39 +0000
To: public-qt-comments@w3.org
Message-Id: <E1EIUMF-0006GG-HX@wiggum.w3.org>


           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

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