xslt-2.0

Change attribute value without creating new output document?

喜欢而已 提交于 2019-12-24 14:29:41
问题 I need to iterate over a bunch of XML documents and simply change the value of one attribute using XSLT 2.0. The rest of the document as well as the document name need to be the same. Is it possible to simply change an existing document without creating a new one as output of the transformation? Or do I need to copy the documents, change the attribute and name them the same as the original one? EDIT <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version='2.0' xmlns:xsl='http://www.w3

Pass user input to XSL stylesheet

点点圈 提交于 2019-12-24 14:28:43
问题 I want to expand a webservice written in java and javascript with a XSL 2.0 stylesheet. The stylesheet is based on this(XSLT 2.0: Transform notation in plain text to svg) XSL sheet and transforms plain text into svg. At the moment it is possible to transform the text from a variable or a file, but it should be possible that the user does his input into the webservice and this input is passed to the xsl sheet and then will be transformed. How would this be possible? To give you a better

XSLT converting style down from 3.0 to 2.0 - variable reference error

怎甘沉沦 提交于 2019-12-24 12:29:42
问题 I have a large XSL 3.0 stylesheet which I need to convert to XSL 2.0. It seems there is one error repeated throughout the document, but I'm not sure how to fix it. For example, in XSL 3.0 I declare these variables: <xsl:variable name="glosspath" select="/tei:TEI/tei:text//tei:add"/> <xsl:variable name="apppath" select="/tei:TEI/tei:text//tei:del | /tei:TEI/tei:text//tei:surplus | /tei:TEI/tei:text//tei:supplied[@reason='added'] | /tei:TEI/tei:text//tei:choice[@style='sic'] | /tei:TEI/tei:text

Replacing XPath Expression with Variable/Function

非 Y 不嫁゛ 提交于 2019-12-24 12:12:46
问题 I have an XSLT 2.0 stylesheet. I need to perform a for-each-group loop, but the value I am grouping on may change, based on parameters passed into the stylesheet. For example, if my XML looks like this (simplified for this example): <root><row><date>2001-01-01</date><text>abc</text></row><row><date>2003-04-02</date><text>xyz</text></row>...</root> I want to perform a for-each-group, grouping on a function applied to the date node. for example, it might be this: <xsl:for-each-group select="

Converting a Flat XML to a Nested XML

隐身守侯 提交于 2019-12-24 09:37:05
问题 I'm trying to figure out how to convert a flat xml file to a nested xml file using xslt. Below is an example of the flat xml that I'm trying to transform. I'm using xslt 2 so I can us the grouping commands but I don't know how. The resulting structure I'm looking for is: <sources> <sourcetype> <sourcetypename>Career Fair</sourcetypename> <sourcelist> <source> <sourcename>Ann Arbor News Fair</sourcename> <sourceid>CFE-10001</sourceid> <eventlist> <event> <eventname></eventname> <eventid><

Get current day in week with xslt

﹥>﹥吖頭↗ 提交于 2019-12-24 09:17:31
问题 How can i get the current day of week in xslt. Like Monday, tuesday.... 0,1,2 would also be acceptable. How can I do this in XSLT? 回答1: Since it's XSLT 2.0: format-date(current-date(), '[F]') 回答2: Have a look at link,this may help you http://www.xsltfunctions.com/xsl/functx_day-of-week.html 来源: https://stackoverflow.com/questions/15923575/get-current-day-in-week-with-xslt

Grouping of similer nodes

好久不见. 提交于 2019-12-24 09:03:48
问题 I have follwing problem in grouping the similer nodes with xsl: input: <?xml version="1.0" encoding="UTF-8"?> <concept id="ads"> <p>para1 content goes here</p> <Bullet>1</Bullet> <Bullet>2</Bullet> <Bullet>3</Bullet> <p>para2 content goes here</p> <Bullet>4</Bullet> <Bullet>5</Bullet> <p>para2 content goes here</p> </concept> Output should be: <?xml version="1.0" encoding="UTF-8"?> <concept id="ads"> <p>para1 content goes here</p> <ul> <li>1</li> <li>2</li> <li>3</li> </ul> <p>para2 content

xslt: select unique node via intermediate reference node?

喜欢而已 提交于 2019-12-24 08:55:32
问题 XSLT 2. Hi, I have an xml that has 3 nodes, named from point of view of the 'children' called: Children, Fathers and MothersFathers. Starting with the Fathers node I need to find the a childs MothersFather node based on the ID's in the Child nodes (the Child node is the intermediate reference joining the other two.) So, for each Father get his children's distinct MothersFather - these aren't humans, a father could have hundreds of children but only twenty or so of the related MothersFathers :

Finding mixed XML content with regular expressions

拟墨画扇 提交于 2019-12-24 07:19:29
问题 During the running of my XSLT 2.0 stylesheet, I have need to find certain text (e.g., "story 3.1", "story 8.19", "story 21.76") and do something with it (e.g., wrap it in a hyperlink). Finding these instances and doing what I want with them were simple tasks. The problem I've run into though is that sometimes I might have mixed content that needs to be wrapped in the hyperlink (e.g., "story 3.1<i>a</i>"). I've not been able to figure out how to do that. Here is some sample data and my

Is there XSLT 2.0 or 3.0 support in BizTalk Server 2016 mapping?

天涯浪子 提交于 2019-12-24 07:07:36
问题 In the past, BizTalk (and the .NET framework in general) has not supported any XSLT version besides 1.0. Our company is about to upgrade to BizTalk Server 2016, and I was wondering whether it's possible (and natively supported) to use XSLT 2.0 or 3.0 for custom mapping in said BizTalk Server version? I know it's not likely they've implemented this, but I've been roaming the internet and I can't seem to find a concrete answer to this question. 回答1: No, it only supports XSLT 1.0. However it has