Uploaded image for project: 'XalanC'
  1. XalanC
  2. XALANC-679

Possible wrong evaluation of abbreviated XPath in template match

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.10
    • Fix Version/s: CurrentCVS
    • Component/s: None
    • Labels:
      None

      Description

      Using the Stylesheet
      """
      <?xml version="1.0" encoding="UTF-8"?>
      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

      <xsl:template match="artikel/*[starts-with(name(),'artikel-')]//titel" >
      '<xsl:value-of select="."/>'<xsl:text>
      </xsl:text>
      </xsl:template>

      <xsl:template match="text()"/>

      </xsl:stylesheet>
      """

      to transform the xml document
      """
      <?xml version="1.0" encoding="UTF-8"?>
      <ROOT>
      <artikel>
      <artikel-xxx>
      <titel>good</titel>
      <div>
      <titel>good2</titel>
      </div>
      </artikel-xxx>
      </artikel>
      </ROOT>
      """

      results in
      """
      <?xml version="1.0" encoding="UTF-8"?>
      'good'

      """

      should be
      """
      <?xml version="1.0" encoding="UTF-8"?>
      'good'

      'good2'
      """

      The old instant saxon produces the expected output.

      Removing the Step "*[starts-with(name(),'artikel-')]" results in the expected output.

        Attachments

        1. XALANC-679.patch
          8 kB
          David N Bertoni

          Activity

            People

            • Assignee:
              dbertoni David N Bertoni
              Reporter:
              floerke@doctronic.de Holger Floerke
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: