» How to use a map in XSLT?
How to use a map in XSLT?
|September 14, 2014
Posted by forumadmin
I am reading the W3C documentation for XSLT 3.0 here. Here is what I have got:
<xsl:variable name="week" as="map(xs:string, xs:string)">
<xsl:map-entry key="'Mo'" select="'Monday'"/>
<xsl:map-entry key="'Tu'" select="'Tuesday'"/>
<xsl:map-entry key="'We'" select="'Wednesday'"/>
<xsl:map-entry key="'Th'" select="'Thursday'"/>
<xsl:map-entry key="'Fr'" select="'Friday'"/>
<xsl:map-entry key="'Sa'" select="'Saturday'"/>
<xsl:map-entry key="'Su'" select="'Sunday'"/>
After we have created a map, how do we use and retrieve its values? Were there different ways to create a map in earlier versions of XSLT?
More Related Questions
- How to use these elements in XSLT? I am reading the W3C documentation for XSLT 3.0 here. I wonder how to use these elements:
- How to use a character map in XSLT? I have this XSLT styleheet:
- Transformer not reading Special Character from Document Object I am trying to read xml data from Document Object, and then using transformer to render the data inside the document object to pdf,using XSL,
My code is :
Document doc = […]
- Retrieve XML file name using XSLT How can I retrieve the XML source file name using XSL 1.0 code? Asked By - Bush Read Answers
- Root element missing XML I am getting a root element missing exception for this code. The code is trying to read the same xml file again. There are around 150 xml files in this location. Can anybody help please?
- Special Characters in XML I am creating a left navigation system utilizing xml and xsl. Everything was been going great until I tried to use a special character in my xml document. I am using » and I get […]
- My XML is not well-formed, but where? Is there any tool around that can tell me where in my docunemt I have a problem with well-formedness (if that is a word). I have a document 3.2MB large, which is not well-formed, but I […]
- jmeter report created using ant xslt does not show max min value Environment Details:
Apache Ant(TM) version 1.9.2,
Java 6 SE build1.6.0_34b04,
When i open the jmeter-results-detail-report.xsl in IE I get the […]
- XSLT document() usage with WebKit browsers I'm having an issue when attempting to include and access multiple XML documents in an XSL styleheet. I'm assigning document nodes as variables and then attempting to access them in my […]
- Transform XML with XSLT and preserve CDATA (in Ruby) I am trying to convert a document with content like the following into another document, leaving the CDATA exactly as it was in the first document, but I haven't figured out how to […]