Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-976

"text" output method should not output comment nodes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 2.3
    • None
    • None
    • Operating System: Solaris
      Platform: Sun
    • 8358

    Description

      "http://www.w3.org/TR/xslt" says at "16.3 Text Output Method",
      "The text output method outputs the result tree by outputting the string-value
      of every text node in the result tree in document order ..." .
      So I think it's good that comment node is not outputed.

      [sample XSLT file]
      ----- =-8 ---------- =-8 ---------- =-8 ---------- =-8 -----
      <?xml version="1.0"?>
      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

      <xsl:output method="text"/>

      <xsl:template match="/">
      <result>This is not comment.<xsl:comment>This is comment.</xsl:comment></result>
      </xsl:template>

      </xsl:stylesheet>
      ----- =-8 ---------- =-8 ---------- =-8 ---------- =-8 -----

      Attachments

        Activity

          People

            Unassigned Unassigned
            naitou.masaya@jp.fujitsu.com Masaya Naito
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: