Questions tagged [apply-templates]
90 questions
1
vote
1 answer
Sorting elements accessed via apply-templates based on the real XML tag name in XSLT
have got a XML like this:

Azi
- 49
- 1
- 5
1
vote
1 answer
what is the explicit version of node()
Is the well-known XSLT 1.0 identity template
synonymous with

Chris
- 4,212
- 5
- 37
- 52
1
vote
2 answers
XSLT 1.0: put conditions into match attribute or apply-templates?
I have a general question regarding and .
I have the case where I match the element E1EDP01. But no all E1EDP01 elements should be matched, only a certain range.
But now what is the correct way of…

Peter
- 1,786
- 4
- 21
- 40
1
vote
1 answer
How can I execute an apply-templates on all non-selected elements within a xsl:copy?
Let's say I have the following XSLT:

Craig
- 1,890
- 1
- 26
- 44
1
vote
1 answer
Add soap header - update a node - copy document
I'm trying to add Soap headers to my document and update the first RS node with
all while copying the remainder of the document nodes. In my real example i'll have more nodes within RS parent node so i'm…

user139873
- 51
- 1
- 1
- 5
0
votes
2 answers
xslt dynamic / conditional apply-template in function of a variable?
I want to display two different XSLT transformations in function of what the user want. The entire XSL file is the same, except for one line.
This line should be as it

GWorking
- 4,011
- 10
- 49
- 90
0
votes
1 answer
0
votes
1 answer
Apply-templates which recurse Elements that contain attribute values to reference another Element
I am having difficulty applying templates to an Element which is the result of a selection of Elements by an attribute.
The code is essentially attempting to recurse an Element which contains other elements referenced by a name attribute.
The xml…

Quinn Carver
- 587
- 7
- 14
0
votes
0 answers
programming languages that have same programming model as 'apply-templates'
XSLT has (amongst other things) what seems to be a pretty unique programming model that supports this 'pattern'
(this example take from the answer to XSLT Identity template overriding)

MrD at KookerellaLtd
- 2,412
- 1
- 15
- 17
0
votes
1 answer
XSLT Identity template overriding
I need to remove some unwanted fields over a big response XML using XSL 1.0, and want to use apply-templates instead of for-each. Below is the code I tried but is not giving expected results i.e., unwanted fields are removed successfully but few…

Mano
- 143
- 1
- 2
- 13
0
votes
2 answers
XSLT copy then sort element, duplicates sorted element
I am trying to sort the E1EDK33 element by "TSRFO_CONSIGNEE" However when doing so I get the original E1EDK33 elements plus the newly sorted elements in the end.
Here is my example file:

JimHalpert
- 3
- 2
0
votes
1 answer
XSLT 1.0 - change the order of lines
I want to change the order of line cac:InvoiceLine depending on this node:
cac:AdditionalItemProperty/cbc:Value
All InvoiceLines that have Item type=RC must be gruop at the end of lines, and all that have CU must be on the top.
0
votes
0 answers
XSL - FOP Replace html tag from CDATA Node
While generating the xsl-fo, I'm trying to replace the html tags inside a CDATA node, but the template is not applying. I can see that if I remove the cdata from the node, then is applying fine.
How can I do to work keeping CDATA inside the node,…

Arnau
- 9
- 9
0
votes
1 answer
Use apply-template for each variable node-set XLST 1.0
I have this input:
VISSHIMEL
…

nagarayan
- 23
- 3
0
votes
1 answer
XSLT How to wrap common tags in different wrapping elements?
I have a common set of tags that need to be wrapped in different wrapper elements.
Sample input XML is like-
Hello there
True
2019-10-17…
FJ-123-99

RIcha Sharma
- 1
- 1