xslt-2.0

Retrieving hashmap values in XSLT 2.0 Using Saxon-HE

谁说我不能喝 提交于 2019-12-12 01:04:15
问题 I want to pass Map object as parameter in XSLT 2.0 version and i want to retrieve the Map object data under XSLT 2.0 file using Saxon-HE. I googled a lot and found Retrieving hashmap values in XSLT link which completely matches according to my need but i am getting exception such as Static error in {map:get($mapData,'1')} in expression in xsl:variable/@select on line 23 column 94 of transformer.xslt: XPST0017: Cannot find a 2-argument function named {http://ns.saxonica.com/map}get(). I don't

For the Paragraph without header part images are not coming

可紊 提交于 2019-12-12 00:57:06
问题 I'm having the two header files (h1, h2), I had write the image information using the below XSL: My Input XSL: <xsl:template match="Body"> <xsl:for-each-group select="*" group-starting-with="h1"> <xsl:if test="not(self::p/img)"> <xsl:variable name="image" select="preceding-sibling::*[1][self::p/img]" /> <topic> <xsl:attribute name="id">topic_<xsl:number count="h1 | h2"/></xsl:attribute> <title> <xsl:apply-templates select="node()"/> </title> <xsl:for-each-group select="current-group() except

Concatenate XSLT element values based on another element value

烈酒焚心 提交于 2019-12-12 00:53:53
问题 I have the following XML: <root> <attributes> <attribute_value>ID1</attribute_value> <attribute_name>id</attribute_name> </attributes> <attributes> <attribute_value>ID2</attribute_value> <attribute_name>id</attribute_name> </attributes> <attributes> <attribute_value>some-link</attribute_value> <attribute_name>link</attribute_name> </attributes> </root> I want to iterate over the file and concatenate all the "attribute_value" values based on the "attribute_name" value using XSLT (1.0 or 2.0).

How to apply xpath in xsl:param on xml passed as input to xml

独自空忆成欢 提交于 2019-12-11 23:57:03
问题 I have one XSLT and XML input for XSLT like below XML file: <root> <a> <b> <c>hi</c> </b> </a> <a> <b> <c>hi</c> </b> </a> </root> XSL file: <xsl:stylesheet> <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/> <xsl:param name="/a//b//c"/> <xsl:for-each select="/a//b//c"> <xsl:element name="celement"> <xsl:copy-of select="c element"/> </xsl:element> </xsl:for-each> How do I transform the XML using XPATH in xsl:param in XSLT? 来源: https://stackoverflow.com/questions/35246061/how

XSL structure for category tree for multiple goods

大憨熊 提交于 2019-12-11 23:13:08
问题 How to make work a solution described here when I change the XML structure to have multiple good entities like that: <?xml version="1.0" encoding="ISO-8859-1"?> <Work> <Good id = "1"> <list num="1050" id = "2531" desc="List 1"> <part num="1"> <pos isKey="0" id="2532" pid="2531" desc="Part 1" /> <pos num="1.2." isKey="0" id="2554" pid="2532" desc="Position 1.2" /> <pos num="1.2.6." isKey="1" id="2591" pid="2554" desc="Position 1.2.6" /> </part> </list> <list num="1090" id = "3029" desc="List 2

Getting detailed error description from Saxon 9.x in .net

不想你离开。 提交于 2019-12-11 22:54:16
问题 I have an xslt2 transform engine setted up with saxon 9.x. I have some big xml file with large xsl transformation file. I can make the transform with XQSharp XSLT2 engine, but with saxon i am getting error: javax.xml.transform.TransformerConfigurationException: Failed to compile stylesheet. 1 error detected. I would like to get some more detailed error information from saxon with for example the linenumber of the error and the cause. The only two exceptions that i could found are: Saxon.Api

descendant match not caught though given in template

允我心安 提交于 2019-12-11 20:42:54
问题 I've the below XML <list> <list.item><label>3.7.8</label> <emphasis type="italic">Health Impact</emphasis></list.item> <list.item><label>3.7.8.1</label> A health </list.item> <list.item><label><star.page>216</star.page> 3.7.8.2</label> The health risk assessment shall include the following key steps: <list> <list.item><label>(i)</label> a systematic identification</list.item> <list.item><label>(ii)</label> an assessment</list.item> <list.item><label>(iii)</label> an </list.item> <list.item>

Split string following a pattern using XSLT 2.0

白昼怎懂夜的黑 提交于 2019-12-11 19:43:13
问题 I have a string that needs to be parsed using XSLT 2.0 Input string Hoffmann, Rüdiger (Universtiy-A, SomeCity, (SomeCountry); University-B, SomeCity, (SomeCountry)); Author, X; Author, B. (University-C, SomeCity (SomeCountry)) Expected output Hoffmann, Rüdiger (Universtiy-A, SomeCity, (SomeCountry); University-B, SomeCity, (SomeCountry)) Author, X Author, B. (University-C, SomeCity (SomeCountry)) The structure is - author name, followed by his university. But, one author could have two

split nodes and assign them to variables for matching

柔情痞子 提交于 2019-12-11 18:53:23
问题 This question is similar to merge two elements using xslt based on attribute values but trying to put this in different way where it could understand better. I have an xml file with two elements whose names are same, but second element is part of first element. Example: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- This is first element--> <book> <mbean code="org.book.mybooks" name="mycompany.props.jndi:name=mybookprops"> <attribute name="bookprops"> abc.mybook.onebook=@Value@

How to print element tags in XML document using XSL

只谈情不闲聊 提交于 2019-12-11 18:07:46
问题 Very much a beginner with XSL. I'm trying transform 2 XML documents into a new XML document. I can't seem to get the tags to print to the new document. Only the content of the elements is printing. XML <books> <book> <name>Cat in the Hat</name> <author>Me</name> ... ... </book> ... ... </book> XSL <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method = "xml" indent = "yes" /> <xsl:template match="/"> <xsl