Questions tagged [xslt-1.0]

Use this tag for questions specific to XSL Transformations version 1.0 and no other version.

W3C Recommendations:

If you are looking for help on using a particular XSLT instruction or XPath function or expression it is a good idea to check the relevant spec sections first and then to explain in your question in what way, using the information from the spec, you couldn't solve your problem; so here is a list of the various sections:

XPath 1.0 functions

String functions

Node Set functions

Number functions

Boolean functions

XSLT 1.0 elements

Online Training Material

  1. Foundations of XSLT 2 and XSLT 1 A Pluralsight course by Dimitre Novatchev
  2. Practical Transformation Using XSLT and XPath A book by G. Ken Holman
6016 questions
10
votes
1 answer

Implementing Key Value Concept in XSLT

I am working on XSLT, where I need to implement something as follows. My Source XML sample looks like this. A B
Patan
  • 17,073
  • 36
  • 124
  • 198
9
votes
5 answers

Dynamically include other XSL files in XSLT

I have a small problem, is there a way to dynamically include another xsl? For example:
Master345
  • 2,250
  • 11
  • 38
  • 50
9
votes
4 answers

Using xslt get node value at X position

How can I get using xslt, node value at X position, without using foreach x x x This is explained in programming sense:
jasin_89
  • 1,993
  • 7
  • 30
  • 41
9
votes
4 answers

XSL recursive call - xsl:functions vs xsl:template with call template

I have basic query. I have been using xsl:template and use call tempate to make recursive calls to the template. I see xsl:function which also has feasibility to make recursive function calls like recursive template calls and achieve the same. When…
Rachel
  • 763
  • 14
  • 29
8
votes
1 answer

group by multiple attributes from xml with xslt

I have the following xml
Jared
  • 402
  • 6
  • 22
8
votes
4 answers

how to apply space between data in xslt

xml 50K 0501/045788775099 Praveen // name will come MENENDEZ Y PELAYOA CORUNA SPA // address will come …
pubby
  • 173
  • 1
  • 3
  • 13
8
votes
2 answers

XSLT - Looping through all child nodes

Don't shoot I'm just the messenger here, but I have some xml that looks like this
dscl
  • 1,616
  • 7
  • 28
  • 48
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
8
votes
3 answers

XSLT Transforming sequential XML to hierarchical XML

I have a requirement to transform a sequential XML node list into a hierarchical, but I run into some XSLT specific knowledge gap. The input XML contains articles, colors and sizes. In the sample below 'Record1' is an article, 'Record2' represents a…
8
votes
3 answers

XSLT: Sort by the lower of 2 values

I have some XML that is formatted as follows: Product 1 15 10 Product 2
MarkS
  • 127
  • 6
7
votes
7 answers

How to Duplicate xml elements

i have to duplicate the xml payload into as many xml payloads based on a specific id, e.g., userid AA0511201143 PARCEL 04/04/2011
738560
  • 129
  • 2
  • 9
7
votes
3 answers

xsl trying to ouput '<' as opposed to '<'

Update: The issue still persists although it is not quite the same as before. Below is an example of what is being input, what is being output and what I want to have output An example of the input: &lt;p&gt;&lt;span…
dudledok
  • 2,800
  • 5
  • 24
  • 36
7
votes
5 answers

Truncate XML with XSLT

I have a question for the clever people of the SO community. Below is a snippet of XML generated by the Symphony CMS. Lorem Ipsum

Lorem…

Neil Albrock
  • 1,035
  • 10
  • 16
7
votes
3 answers

Create XPath function in XSLT 1.0

I'm looking how to create my own XPath function in XSLT-1.0. For example I have simple XPath expression which I'm using again and again in my XSLT template. I want to create my own XPath function myOwnFunction($var) which calls XPath…
michal.kreuzman
  • 12,170
  • 10
  • 58
  • 70
7
votes
3 answers

"img" must be terminated by the matching end-tag

When parsing some an XSL XML file using docx4j, I keep receiving this error: 'The element type "img" must be terminated by the matching end-tag "". Exception Error in Docx4JException' I have tried all sorts of combinations to solve the…
snowstreams
  • 575
  • 2
  • 13
  • 23