Questions tagged [xslt-2.0]

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

XSL Transformations version 2.0, the successor to XSLT 1.0. It introduces the following features:

  • xsl:function: user defined functions that can be invoked from within XPath expressions

  • XPath extension mechanism: a formal means of invoking methods written in other languages from within an XSLT expression

  • unparsed-text-available(): checking a URL to insure that it returns text content

  • unparsed-text(): loading non-XML content into an XSLT transformation

  • Sequences: collections of atomic data types or XML objects

  • Date/Time API: functions to manipulate date formats

  • Numeric iterations: expressions that facilitate loops without recursion

  • xsl:analyze-string: text processing of a string based on a regular expression

  • xsl:next-match: allows multiple template rules to be applied to the same source node

  • xsl:result-document: send output to a file or web service

  • xsl:for-each-group: allows nodes to be organized and referenced as a group

  • Inline control keywords: XQuery extensions for iterating and conditional statements in XPath

  • xsl:character-map: map entities to some output form, to replace disable-output-escaping

  • tunnel attribute: allows pass-through of a parameter to a nested template which depends on it

There are several standalone XSLT 2.0 processors, including:

Online Training Courses

Books available online

See also:

  • Saxon CE is an implementation of XSLT 2.0 that runs in any modern browser; it includes extensions that provide declarative handling of user interaction events.

News: As of June 8th 2017, XSLT 3.0 is a Recommendation of the W3C Consortium and therefore the latest version of XSLT.


4654 questions
4
votes
1 answer

XSL - Remove non breaking space

In my XSL implementation (2.0), I tried using the below statement to remove all the spaces & non breaking spaces within a text node. It works for spaces only but not for non breaking spaces whose ASCII codes are,     …
Rachel
  • 763
  • 14
  • 29
4
votes
2 answers

NamesSpace removal from XSLT

Hi I am writing an XSLT and within that I am using function. Now when it's executed then namesapce from xml are also getting copied. In order to remove that I used function like
Kapil
  • 832
  • 2
  • 14
  • 29
4
votes
3 answers

xslt 2.0 xsl:number recursive counter - more efficient way?

I want to populate all attribute/value elements whose name is "order" with an increasing counter value. ... order ... The "order" attributes can appear anywhere in the document and at…
4
votes
3 answers

xslt: How can I apply two templates to the same node during processing?

I have an XSL template that matches any element with a child:
Altreus
  • 5,759
  • 4
  • 27
  • 27
4
votes
2 answers

Unescape during XSLT transform

I'm transforming an XML document using XSLT into XHTML, using Saxon, XSLT 2.0 compliant. Within my XML documents I have nodes like so (truncated here for brevity):
Joel
  • 29,538
  • 35
  • 110
  • 138
4
votes
4 answers

dynamic xpath in xslt?

I have follwing set of files: SourceFile.xml: Atif
atif
  • 1,137
  • 7
  • 22
  • 35
4
votes
2 answers

using Functions vs using templates in XSLT?

What are the pros and cons of functions vs templates in XSLT? I want to send a unix-timestamp and get an answer like "today" or "tomorrow" or "next week". Which method is most appropriate for this?
Himmators
  • 14,278
  • 36
  • 132
  • 223
4
votes
2 answers

Use xslt replace function to replace a word with an element

I want to usw the XSLT replace function to replace words in a text with word. I wrote the following template:
Suidu
  • 75
  • 1
  • 4
4
votes
1 answer

Is there a way to pass a variable in schematron?

I want to use a variable to represent my schematron assertion and use it in my validation message. For example: User: '----' doesn't exist as a…
4
votes
2 answers

Manage includes in XSL

I have a code generating XSL that includes several XSL files. The files are included in order to call templates. There can be the case when one of the files that I need to include does not exist in my file. I could create a dummy file with the same…
Alexandru Cimpanu
  • 1,029
  • 2
  • 14
  • 38
4
votes
3 answers

When will xslt 2.0 be finished

I really want to start developing in xslt 2.0 but I have been hearing that xslt 2.0 is not supported in browsers yet. Is there an expected date that xslt 2.0 will be done and when will it be supported in browsers?
Luke101
  • 63,072
  • 85
  • 231
  • 359
4
votes
1 answer

XSLT 2.0: Transform notation in plain text to svg

I am new to transformations between different formats. My goal is to transfer a notation from a toolkit which is in a plain text format to svg. An easy example would be that I have an orange ellipse and the notation would be like this (x and y is…
Randy Random
  • 69
  • 2
  • 8
4
votes
2 answers

Sorting several XML files along dates and merging it into one with XSLT

I have several single XML-files containing historic letters in TEI. Now I want to merge them into one single file with the date as the criteria. A1.xml Letter 1
martinanton
  • 217
  • 1
  • 7
4
votes
4 answers

xsl:fo How to draw checkboxes

guys I need a checkboxes in my xsl:fo document and so the question, is their a way in fo ,or need I an picture(graphic) ? I use FOP and xslt 2.0 Here is a picture of the checkbox
Elrond
  • 479
  • 1
  • 8
  • 21
4
votes
2 answers

Memory efficient XSLT for transforming large XML files

This question is related to a recent answer by michael.hor257k, which is in-turn related to an answer by Dimitre Novatchev. When used the stylesheet in the above mentioned answer(by michael.hor257k), for a large XML(around 60MB, sample XML is…
Lingamurthy CS
  • 5,412
  • 2
  • 13
  • 21