Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4779794

attributes computed using <xsl:attribute> contains XML processing instruction

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.4.2
    • 1.4.2
    • xml

      HowTo reproduce the problem:

      test.xsl file contents:
      -------------------------------
      <?xml version="1.0"?>
      <xsl:stylesheet
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

      <xsl:template match="docs">
        <xsl:element name="out">
          <xsl:attribute name="test1">
              <xsl:value-of select="a"/>
          </xsl:attribute>
        </xsl:element>
      </xsl:template>
      </xsl:stylesheet>

      test.xml file contents:
      ------------------------------
      <?xml version="1.0"?>
      <docs>
      <a>X</a>
      </docs>

      Correct output of running Xalan processor on test.xml with test.xsl:
      ----------------------------------------------------------------------
      <?xml version="1.0" encoding="UTF-8"?>
      <out test1="X"/>

      Output from running Xalan processor in the Mantis build:
      ----------------------------------------------------------
      <?xml version="1.0" encoding="UTF-8"?>
      <out
      test1="<?xml version="1.0" encoding="UTF-8"?>
      X"/>

      Notice in the Mantis output, the XML PI '<?xml version="1.0" encoding="UTF-8"?>'
      get included in the 'test1' attribute on the <out> element.
      ###@###.### 2002-11-20

            gsharmasunw Gopal Sharma (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: