xsl

Upgrading XSLT 1.0 to XSLT 2.0

匿名 (未验证) 提交于 2019-12-03 01:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: What is involved in upgrading from XSLT 1.0 to 2.0? 1 - What are the possible reasons for upgrading? 2 - What are the possible reasons for NOT upgrading? 3 - And finally, what are the steps to upgrading? I'm hoping for an executive summary--the short version :) 回答1: What is involved in upgrading from XSLT 1.0 to 2.0? 1 - What are the possible reasons for upgrading? If you are an XSLT programmer you'll benefit largely from the more convenient and expressive XSLT 2.0 language + XPath 2.0 and the new XDM (XPath Data Model). You may want to

XSLT 1.0 Using position() in <xsl:for-each> and <xsl:template>

匿名 (未验证) 提交于 2019-12-03 01:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My understanding is that the usage of <xsl:template /> and <xsl:for-each> almost serve the same purpose and <xsl:for-each > is a sort of "anonymous inline template" . Question: However, considering the below scenario, i think using <xsl:for-each> is more appropriate. Please validate my understanding, or is there a way the output can be achieved through <xsl:template> as well? Input XML: <?xml version="1.0" encoding="UTF-8"?> <books> <book.child.1> <title>charithram</title> <author>sarika</author> </book.child.1> <book.child.2> <title

show XML in HTML with inline stylesheet

匿名 (未验证) 提交于 2019-12-03 01:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: It's not an duplicate, the problem ist not show an xml in html, rather to show xml with occasional stylesheets for single lines. i'm looking since hourse for an solution to show xml in a html page with inline css. Background: Input data is an xml file, what will be compared with another xml file in java. The comparison is processed by org.custommonkey.xmlunit. Now i like to transform the xml via xslt and the xpathes from the comparison result of xunit. Input XML (Multilevel, but for this example very simplified, the Field changed by is

Batch XSLT Transformation, find | xarg xsltproc

匿名 (未验证) 提交于 2019-12-03 01:44:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'd like to recursively find every "foo.xml" file and on each foo.xml apply the xslt bar.xsl and save over the original foo.xml. When I run the following commands, separately, they work. find . -name foo.xml xsltproc -o foo.xml bar.xsl foo.xml But, when I pipe them, nothing happens to foo.xml. find . -name foo.xml | xargs xsltproc -o foo.xml bar.xsl I think I'm missing something simple... Thanks, in advanced. 回答1: Warning both of these will obviously overwrite the xml's with the transformation as asked in the question. With xargs

sorting dates in XML using xslt

匿名 (未验证) 提交于 2019-12-03 01:42:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to sort the dates in xml using xslt and my date element is validated in xsd with datatype as date below is my xml and xsl XML <Trade xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Symbol xsi:type="TradedSymbol" Type="Swap"> <Economic xsi:type="EconomicLeg"> <Leg xsi:type="IRLegGeneratedFixed"> <Schedule xsi:type="ScheduleGeneratorFixed"> <Date>2014-06-17</Date> </Schedule> </Leg> </Economic> </Symbol> <Symbol xsi:type="TradedSymbol" Type="Swap"> <Economic xsi:type=

Retrieving hashmap values in XSLT 2.0 Using Saxon-HE

匿名 (未验证) 提交于 2019-12-03 01:41:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: 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 know where i am doing mistake. These are the my

XSLT function returns different results [Saxon-EE vs Saxon-HE/PE]

匿名 (未验证) 提交于 2019-12-03 01:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am currently working on a pure XSL-Transformation with Saxon-Processor in various versions. Below is my short stylesheet, simplified for the needs of my question: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:foo="bar"> <xsl:output encoding="UTF-8" method="text"/> <xsl:template match="/"> <xsl:text>Call of func_1: </xsl:text> <xsl:value-of select="foo:func_1()"/> <xsl:text> Call of func_1: </xsl:text> <xsl:value-of

PHP Change XML node values

匿名 (未验证) 提交于 2019-12-03 01:36:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm having some difficulties in changing XML Node values with PHP. My XML is the following <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ProcessTransaction xmlns="http://example.com"> <TransactionRequest xmlns="http://example.com"> <Header> <RequestType>SALE</RequestType> <RequestMethod>SYNCHRONOUS</RequestMethod> <MerchantInfo> <PosName>kwstasna</PosName> <PosID>1234<

how to make xsl tokenize work

匿名 (未验证) 提交于 2019-12-03 01:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have a huge xsl file but the section where i use "tokenize" to parse through a comma separated string is throwing an error. For simplicity purposes I have broke it down to just test the tokenize piece only and cannot seem to make any progress. I keep getting the following error: Expression expected. tokenize(-->[<--text],',') I tried using some example xsl shared in other posts but never managed to get it to work. I am having a difficult time understanding why my xsl code below is not valid. It seems t be very straightforward but

Inserting a line break in a PDF generated from XSL FO using &lt;xsl:value-of&gt;

匿名 (未验证) 提交于 2019-12-03 01:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am using XSL FO to generate a PDF file containing a table with information. One of these columns is a "Description" column. An example of a string that I am populating one of these Description fields with is as follows: This is an example Description . List item 1 List item 2 List item 3 List item 4 Inside the table cell that corresponds to this Description, I would like the output to display as such: This is an example Description . List item 1 List item 2 List item 3 List item 4 I've learned from searching elsewhere that you