xslt-2.0

Create conditional table row with XSLT

為{幸葍}努か 提交于 2019-12-11 10:45:58
问题 I'm an XSLT newbie, so please excuse my ignorance. I need to format football standings from an XML file and create an HTML table. I'm able to do all I need to do except one thing. I need to create a table row above each region, and I can't find a way to do this. Here is my XML file: <?xml version="1.0" encoding="UTF-8" ?> <Result> <Standings> <Division Name="Region 1A"> <Team Name="Bogue Chitto" City="Bogue Chitto" State="MS" IsMemberSchool="Yes" League="1A Region 4" Wins="4" Losses="0" Ties=

Compare data of 2 xml files and output the difference

佐手、 提交于 2019-12-11 10:43:40
问题 I have 2 xml files with same schema and I want to compare both the files to get only nodes which are present in 1st document but not in 2nd document and vise versa. Case 1: so my 1st xml is a.xml <cases> <no sort="1">1</no> <no sort="2">2</no> <no sort="3">3</no> <no sort="4">4</no> <no sort="5">5</no> <no sort="6">6</no> </cases> 2nd xml is b.xml <cases> <no sort="1">1</no> <no sort="2">2</no> <no sort="3">3</no> <no sort="4">4</no> <no sort="5">5</no> <no sort="6">6</no> <no sort="7">9</no>

XML Key/value manipulation on condition using XSLT

那年仲夏 提交于 2019-12-11 10:13:58
问题 I have data like this - <item> <name>Bob</name> <fav_food>pizza</fav_food> <key>Salary</key> <value /> <value2>1000</value2> <value3 /> </item> I want my output to look like this - <item> <name>Bob</name> <fav_food>pizza</fav_food> <Salary>1000</Salary> </item> In this case, Salary gets the value of 1000 because value is empty and value2 is not (value has higher priority than value2, which has higher priority than value3). It is guaranteed that value,value2 and value3 all exist, and only one

Xsl v.2 won't work in Visual Studio 2013

谁说我不能喝 提交于 2019-12-11 10:09:52
问题 I'm getting the following exception while running Xls v.2 template in Visual Studio 2013 (in no debug mode): XslTransformException --------------------- 'for-each-group' is not a recognized extension element. An error occurred at blah.xslt(27,6). Is it possible to use xsl 2 with VS2013 at all? 回答1: Microsoft does not have any XSLT 2.0 implementation, all its XSLT processors (the various versions of MSXML in the COM world and XslTransform and XslCompiledTransform in the .NET world) are XSLT 1

condition checking in xslt

删除回忆录丶 提交于 2019-12-11 09:38:48
问题 A Little update in my previous question already @Dimetre answered that Link Input XML <tutorial> <lessons> <lesson> chapter Bat 20 </lesson> <lesson> chapter Pen Ball 10~ </lesson> <lesson> chapter Book </lesson> <lesson> note lesson </lesson> <lessons1> <lesson> chapter Pencil 10 </lesson> <lesson> description page </lesson> <lesson> chapter Car Tank 25 </lesson> </lessons1> </lessons> The Output will be <Geography> <historical> <social> <toc1> <toc> <chapter>chapter</chapter> <unit>Bat<

Substituting values over many XML elements [XSLT 2.0]

匆匆过客 提交于 2019-12-11 09:13:26
问题 This question is an extension of this one. I have many values, as seen below: <myStuff> <elem1>asdf</elem1> <elem2>foo bar</elem2> <elem3>foo bar foo</elem3> <elem4>foofoo</elem4> </myStuff> I've been doing a copy-of over MOST the elems (the select in the copy-of is very specific) and then doing a find-and-replace on the resulting XML, but I'd like to combine the two. In most of the situations where I've applied this, I would replace anything that said <xsl:value-of select="whatever"> with

need to identify duplicates with a condtional param in xslt1.0

﹥>﹥吖頭↗ 提交于 2019-12-11 09:09:33
问题 Here is my input <depositAccount> <EligibleDepAccount> <type>DDA</type> <market>050</market> <number>12345678</number> <status>Y</status> <relationship>F-N</relationship> <productCode>ICK</productCode> <packageCode/> <primaryIndicator>N</primaryIndicator> <customer1DrivBen/> <customer2Relationship>O-N</customer2Relationship> <customer2DrivBen/> <customer3Relationship/> <customer3DrivBen/> <customer3CifKey/> <tierDetail> <level>0</level> <violationCounter>0</violationCounter> <enrollmentDate>0

Get value from web.config into XSLT file

我与影子孤独终老i 提交于 2019-12-11 08:59:03
问题 I have some values in my web.config that I want to access in my XSLT file. How do I do that? I have done this to load the config file in my XSLT: <xsl:variable name="config" select="document('..//Website//web.config')"/> <p><xsl:value-of select="$config//appSettings/add[@key='Test']/@value"/> </p> After this I am stuck - nothing gets rendered. Ok.I have done some changes.I have tried using a separate XML file and i am able to get value from the file in my variable. <xsl:apply-templates select

Avoid link on the figure caption as well How

二次信任 提交于 2019-12-11 06:56:49
问题 On my input xml i have the figures, images and its cross-linking text in many places. When I try to code cross link using tag, it does cross link on the caption text also. But, I need to code cross link everywhere except on the caption text. <par class="para">In addition to the core publications, there is also a complementary set of ITIL publications providing guidance specific to industry sectors, organization types, operating models and technology architectures on `Figure 1.1`.</par> <par

Using XSLT to recursively load relative XML files and apply transformation

和自甴很熟 提交于 2019-12-11 06:29:48
问题 I have a xml file whose structure looks like this: <root> <includes> <includeFile name="../other/some_xml.xml"/> </includes> <itemlist> <item id="1" > <selections> <selection name="one" /> </selections> </item> </itemlist> The xslt <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xslt"> <xsl:output method="xml" indent="yes" xalan:indent-amount="4" /> <xsl:template match="/"> <xsl:element