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

unable to parse an xpath 3 map expression

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • Xalan-interpretive, XPath
    • Security Level: No security risk; visible to anyone (Ordinary problems in Xalan projects. Anybody can view the issue.)
    • None

    Description

      The following XSL 3.0 stylesheet, doesn't work with Xalan-J's current implementation on dev repos branch xalan-j_xslt3.0:

      <?xml version="1.0" encoding="utf-8"?>
      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:map="http://www.w3.org/2005/xpath-functions/map"
      version="3.0"
      exclude-result-prefixes="map">

      <xsl:output method="xml" indent="yes"/>

      <xsl:template match="/">
      <map>
      <xsl:variable name="map1" select="map

      {0 : 'hello', 1 : 'there', 2 : ('yes','no')}

      "/>
      <xsl:for-each select="map:keys($map1)">
      <entry key="

      {.}

      " value="

      {map:get($map1, .)}

      "/>
      </xsl:for-each>
      </map>
      </xsl:template>

      </xsl:stylesheet>

      Xalan-J seems to have issues, parsing map entry value ('yes','no').

      But as a workaround, the following works though:
      <xsl:variable name="seq1" select="('yes','no')"/>
      <xsl:variable name="map1" select="map

      {0 : 'hello', 1 : 'there', 2 : $seq1}

      "/>

      (i.e, if the mentioned map entry value is, referred from an XSL variable)

      Attachments

        Activity

          People

            mukul_gandhi Mukul Gandhi
            mukul_gandhi Mukul Gandhi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: