Questions tagged [xslkey]
43 questions
1
vote
1 answer
Nesting of xsl:key() within xsl:key() & combining results of xsl:key()
I have 2 unrelated questions. I need to do a grouping of data using XSLT. I need this to function like how a nested IF within an IF would function. After which, I need to group the data so that I can split it into multiple files according to the…

Melita
- 11
- 2
1
vote
1 answer
Using xsl:key to store result of boolean expression
In my transformation there is an expression some elements are repeatedly tested against. To reduce redundancy I'd like to encapsulate this in an xsl:key like this (not working):

hielsnoppe
- 2,819
- 3
- 31
- 56
1
vote
1 answer
how to select from key which field not empty
i have xml file and xslt transformation below:
…

testCoder
- 7,155
- 13
- 56
- 75
1
vote
1 answer
Grouping nested elements in xslt 1.0
I've been looking at examples of Muenchian grouping in XSLT 1.0, specifically this example here. However I'm unable to get it working on a more complex XML structure.
My XML currently looks like this:

pat007
- 13
- 2
1
vote
1 answer
Returning page numbers for a set of elements (optimisation for XSLT 1.0/msxsl)
This is not so much 'how do I do xxx' but 'how do I do xxx optimally?' (really hoping the challenge floats Dimitre's boat...)
All of the following is complicated by the restriction of the XSL processor (msxsl - basically XSLT 1.0 with a node-set(),…

Tom Hillman
- 327
- 1
- 10
0
votes
2 answers
XSLT external lookup table correct usage - key() function?
I have searched around and found some tutorials for xsl:key and key() function, but somehow I still am missing some understanding apparently.
There is a XML-XML transformation I need to do, which includes some 10 fields where you I have to take…

Gnudiff
- 4,297
- 1
- 24
- 25
0
votes
2 answers
XSLT transformation: Grouping coverage codes by vehicle category and calculating premium split
Grouping in XSLT
Need to create a XSLT for below Request XML.
XSLT has to do below:
Group the Coverage codes based on vehicle category.
Sum up premium per coverage code
Sum up premium per coverage code and vehicle category
Get the Vehicle category…

user1635003
- 35
- 4
0
votes
1 answer
Changing xsl:key to use contains function
I have a small lookup file, internal_docnbr_titles.xml:
Engine Manual
EM
…

Caroline
- 167
- 1
- 11
0
votes
1 answer
XSLT 2.0: Check if string within a node-set is contained in another string
I have a requirement in which the input XML that is received has different error description for the same error code. I need to compare whether a part of the text is contained within the error description in order to do some filtering. Below is the…

Aniket V
- 3,183
- 2
- 15
- 27
0
votes
1 answer
Populating column dynamically from key value pair
I am working with an xslt file for styling. I am showing some content in tabular format. I need to dynamically populate one column from pre defined key value pair.
Please look at below example

Anam Qureshi
- 161
- 2
- 8
0
votes
1 answer
Create XML based on 2 XMLs and looking up values in both files using XSLT2.0
I am trying to generate a XML based on 2 other XMLs. I am polling a DB that returns details of people(There can be n number of people returned in query). The final XML should have the exact number of Data tags as the distinct name tags in the XML…

karD
- 43
- 10
0
votes
1 answer
XPath Filtering with xsl:key() function
I am trying to compare two xmls based on some node value.
Below are the two xmls:
a.xml
a
aa
e
ee
…

javaCurious
- 140
- 2
- 14
0
votes
1 answer
xsl:sort with preceding-sibling XSLT 1.0 XSL-FO muenchian xsl:key
I would like to access preceding-siblings in a sorted list. I'm using Antenna House 6.2 and XSLT 1.0. I tried using the msxsl extension with node-set() but calls to node-set() failed. Some say accessing the preceding-sibling in a sorted list can't…

Caroline
- 167
- 1
- 11
0
votes
1 answer
XSL group by node value
I have a case of XSL key grouping. The goal is to replace a value based on an ID match.
Input:
…

Babkoy
- 15
- 5
0
votes
1 answer
XSL build node based on key
INPUT:
44422
FR-JUNIOR
miss

user3529643
- 105
- 8