xslt

xsl string-join() multiple variables - only use non-empty

生来就可爱ヽ(ⅴ<●) 提交于 2020-03-20 08:36:35
问题 I'd like to create several xsl:variable that may or may not be null then join them: <xsl:variable name="creatorType" select="replace(lib:merge(subfields/subfield[matches(@code,'[e]')],' '),'author|[.$]','')" /> <xsl:variable name="creatorAttribution" select="replace(lib:merge(subfields/subfield[matches(@code,'[j]')],' '),'[,-.]$','')" /> <xsl:variable name="creatorNameFullForm" select="replace(lib:merge(subfields/subfield[matches(@code,'[q]')],' '),'[,-()]$','')" /> <xsl:variable name=

How to join 2 XSL codes in a single XSL file

拟墨画扇 提交于 2020-03-06 09:31:40
问题 I have provided the input and desired expected xml in another question at the below link: How to re-arrange xml using xslt with repeated xml nodes Request to please let me know how to join the below 2 XSL codes in a single XSL file so that it works on my input xml. Code for 'INFONAMEADDRESSMANUFACTPLANT' Node: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes"/> <xsl:strip-space elements="*" /> <xsl:template match="@*|node()">

How to join 2 XSL codes in a single XSL file

人走茶凉 提交于 2020-03-06 09:31:08
问题 I have provided the input and desired expected xml in another question at the below link: How to re-arrange xml using xslt with repeated xml nodes Request to please let me know how to join the below 2 XSL codes in a single XSL file so that it works on my input xml. Code for 'INFONAMEADDRESSMANUFACTPLANT' Node: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes"/> <xsl:strip-space elements="*" /> <xsl:template match="@*|node()">

restore and explicate child-parent's interconnection hidden in attribute's data (and not represented in XML as a structure) [XSLT 1.0]

别说谁变了你拦得住时间么 提交于 2020-03-05 04:55:29
问题 The XML file consists of absolutely homogeneous sequences of nodes. Following xml formal logic - there is no parent-child interconnections. All nodes are on the same level, they are siblings. All nodes consists of: single element with the same name, consisting of same set of attributes So its structure always looks like: <document ID-1="value" ID-2="value" ID-3="value" attr-4="value"/> <document ID-1="value" ID-2="value" ID-3="value" attr-4="value"/> <document ID-1="value" ID-2="value" ID-3=

Unable to split and merge in XSLT

こ雲淡風輕ζ 提交于 2020-03-05 04:37:30
问题 I have an Xml <input Inputxml="&ltOrder..<LinePPlineNO="1@quot;Line/> >" > How do i remove some part of string using xsl .. for eg I need to remove a whole string from < to > for a PPline 1 I need to splie the string in 3 parts remove the string from lt to gt and merge the part 1na dpart 3 of string <Test Attrib1="b" Attrib2="C" Inputxml=" <OrderLine OrderedQty="1" PrimeLineNo="1" ShipNode="ABC" $gt; </OrderLine $gt; <OrderLine OrderedQty="1" PrimeLineNo="2" ShipNode="ABC" $gt; </OrderLine

Unable to split and merge in XSLT

天大地大妈咪最大 提交于 2020-03-05 04:37:11
问题 I have an Xml <input Inputxml="&ltOrder..<LinePPlineNO="1@quot;Line/> >" > How do i remove some part of string using xsl .. for eg I need to remove a whole string from < to > for a PPline 1 I need to splie the string in 3 parts remove the string from lt to gt and merge the part 1na dpart 3 of string <Test Attrib1="b" Attrib2="C" Inputxml=" <OrderLine OrderedQty="1" PrimeLineNo="1" ShipNode="ABC" $gt; </OrderLine $gt; <OrderLine OrderedQty="1" PrimeLineNo="2" ShipNode="ABC" $gt; </OrderLine

Handling Multiple For Loop in XSLT

倾然丶 夕夏残阳落幕 提交于 2020-03-03 12:02:27
问题 Dear Experts, I have to use multiple for-loops in XSLT. Presently with my XSLT I generate output with extra nodes at 'GroupDetail'. Input Request <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:v1="http://xmldefs. ag.com/Applications/eer/V1" xmlns:wsa="http://www.w3.org/2005/08/addressing"> <SOAP-ENV:Header> <wsa:messageId>04383-34380-3439939</wsa:messageId> <

How to convert attributes from XML to values and values to subvalues…?

核能气质少年 提交于 2020-02-28 23:57:25
问题 here is what I would like to do: Convert this XML: <book author="Name" year="2000">Book title</book> To this XML: <book><author>Name</author><year>2000</year><value>Book title</value></book> I would like to do it with xslt or something I can run from bash... Thanks. 回答1: This transformation : <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes"/> <xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="node()|@*

Need instream-foreign-object and text to both align to the bottom in XSL-FO

折月煮酒 提交于 2020-02-25 11:53:22
问题 I have an XSL-FO stylesheet that is used for generating a barcode with a piece of description text immediately after it. When I run it through the Ibex FO application, the text properly lines up with the bottom of the barcode. When I run it through Apache FOP (it's an older version 0.3x... I CAN'T change this), the text lines up with the TOP of the barcode (I need it to work the same in both). I'm really hoping there is some workaround here. This is what I have: <xsl:template match="barcode">

Need instream-foreign-object and text to both align to the bottom in XSL-FO

≡放荡痞女 提交于 2020-02-25 11:53:21
问题 I have an XSL-FO stylesheet that is used for generating a barcode with a piece of description text immediately after it. When I run it through the Ibex FO application, the text properly lines up with the bottom of the barcode. When I run it through Apache FOP (it's an older version 0.3x... I CAN'T change this), the text lines up with the TOP of the barcode (I need it to work the same in both). I'm really hoping there is some workaround here. This is what I have: <xsl:template match="barcode">