Questions tagged [xslkey]

43 questions
8
votes
1 answer

XSLT 1.0 How to use xsl:key with document() function

I'm trying to use xsl:key to lookup items in an external XML document, using the XSL document() function. I am able to get the xsl:key part to work if, instead of using document(), I just merge the two XML files (using XmlDocument in C#). However…
MTS
  • 1,845
  • 2
  • 17
  • 18
5
votes
1 answer

xsl:key not working when looping through nodeset obtained with xalan:nodeset

I have found a case where xsl:key seems not to be working. I am using XSLT 1 with Xalan (compiled) and this is what is happening: 1.- This works: key named test1 works fine:
Fernando
  • 1,013
  • 2
  • 10
  • 23
4
votes
1 answer

Using two elements for xsl:key key

I know that if I have an XML file like this:
Paul Reiners
  • 8,576
  • 33
  • 117
  • 202
4
votes
4 answers

Can XPath do a foreign key lookup across two subtrees of an XML?

Say I have the following XML... ...what would the…
dacracot
  • 22,002
  • 26
  • 104
  • 152
3
votes
3 answers

muenchian grouping

I was wondering how this predicate([1]), is hardcoded as 1 always in the muenchian grouping. The concept was not clear for me, after a lot of search. It is explained as the current node, is compared with the 1st group returned by the key. Why does…
Suresh
  • 1,081
  • 4
  • 21
  • 44
2
votes
1 answer

xslt 1.0, select group of nodes with key

I want to select nodes based on some variables. The XML code: 1345 11245 88885
GWorking
  • 4,011
  • 10
  • 49
  • 90
2
votes
2 answers

XSL key using multiple values

The following is the sample XML structure I'm working on: 4000 4000 tag 4000
Sanjay
  • 21
  • 1
  • 4
2
votes
2 answers

XSLT 1.0 Grouping Key for different Nodes and Elements

I am looking at the Muenchian Grouping. I tried finding examples that are similar to my xml but can't find any. Most of the examples are well structured while mine is confusing. Here's a shortened version of my XML (note that I can't change the XML…
Yun
  • 237
  • 1
  • 4
  • 15
2
votes
2 answers

Using xsl:key to find an attribute from a matched child

Fairly new to XSL - so please forgive noobishness. I have an input XML document (this is actually the docbook form of the Jargon File, snipped significantly):
Cooper
  • 1,267
  • 11
  • 16
2
votes
1 answer

Use XSLT key() function to lookup nodes based on two attributes in separate elements

I'm trying to use the XSLT key() function to return all the elements in an XML file that match the following two criteria: Code[code=$code] AND ancestor::CodeType[type=$codeType]` Here is a simplified example of what the input XML looks…
MTS
  • 1,845
  • 2
  • 17
  • 18
1
vote
1 answer

XSLT Key Grouping for Child Nodes

1
A1 1000
A2 2000
Harish M
  • 33
  • 4
1
vote
2 answers
1
vote
1 answer

xsl Transformation for Grouping multi layer results

I am hoping that someone can help me asI have been trying to figure out how to make a transformation of a data set into a table structure that is grouped on multiple levels. The first level is the Event Date, the second is the Company Name, and the…
Peter S
  • 23
  • 1
  • 5
1
vote
1 answer

XSLT 1.0 multiple keys cross referencing and consolidating

Thank you for taking the time to look my question. I have an input structure (below) where each row represents a movement from one location item to another. So each row has a from location and a to location. The target is a nested xml where a…
1
vote
1 answer

Finding Specific Descendant Nodes With XSL:Key

Given the following code:
OpenDataAlex
  • 1,375
  • 5
  • 19
  • 39
1
2 3