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
6
votes
1 answer

What XSLT instructions change the current node other than for-each?

I have this input: F1A1 F1A2 F1A3
Pacerier
  • 86,231
  • 106
  • 366
  • 634
6
votes
3 answers

Saxon 9.x vs XQSharp vs AltovaXML for .net

I need XSLT 2.0 processor tool for use in .net 4.0. I found out that XSLT 2.0 is not supported by .net. Alternatives are 3rd party engines like Saxon 9.x or XQSharp. I need XSLT 2.0 support for a commercial production environment, where performance…
MLewi
  • 261
  • 4
  • 12
6
votes
1 answer

How to use XSLT 3.0 from a Java application?

The general java code i use to process XSLT and XML files are : public static final String transformXmlDocument(String inputXmlString, File xsltFile) { TransformerFactory factory = TransformerFactory.newInstance(); …
Wilvasini
  • 163
  • 4
  • 19
6
votes
3 answers

xslt call template with dynamic match

i am trying to paas the dynamic parameter while calling the template to suppress nodes from the xml. I would call this template like: transform employee.xml suppress.xsl ElementsToSuppress=id,fname employee.xml
atif
  • 1,137
  • 7
  • 22
  • 35
6
votes
4 answers

Finding the difference between two dateTimes in XSLT

I have an XML file which includes some dates with start and end points, like shown as follows: ..... ..... Question: How to calculate the difference between two time…
Saber
  • 133
  • 1
  • 9
6
votes
3 answers

Looping over distinct values

Given a variable which returns a list of distinct States using the distinct-values() function, is there a way to tokenize the variable in a for-each loop? AL AL NM The following…
johkar
  • 435
  • 3
  • 8
  • 12
6
votes
1 answer

count the nodes ignoring blank nodes

I've the below XML. Case 1 1.1

PART 54

Construction

PART 54

I INTRODUCT

Time
user3872094
  • 3,269
  • 8
  • 33
  • 71
6
votes
2 answers

XSLT templates' ambiguity clarification

When ran the following input XML false true against the following XSLT:
Lingamurthy CS
  • 5,412
  • 2
  • 13
  • 21
6
votes
2 answers

How to handle the illegal HTML characters in XSL

I have an XML file which stores data. I am using an XSL to generate HTML files from that XML file. When I try to do that I get the error Illegal HTML character: decimal 150 I am not allowed to change the XML file. I have to map that one and many…
US1925
  • 63
  • 1
  • 3
6
votes
1 answer

Insert node into another XML, create new elements (or update existing ones) and reorder resulting document

Well, posting my first question even if I'm assiduously use the site. I've been trying to get a solution for this for the last two days without success. Using some of the answers to similar questions on this site (this, this, this, this and many,…
oswcab
  • 105
  • 6
6
votes
3 answers

XPath 2.0 implementations?

Are there any XML libraries that support XPath 2.0? I'm specifically looking for an open-source, portable, C-compatible implementation, but for the sake of this question, I'd also like to know about any others. So far, I've only heard of the…
flacs
  • 3,913
  • 4
  • 19
  • 20
6
votes
1 answer

xslt 2.0 multiple grouping

My Question: How can I apply double (or multiple) grouping? Here is the source XML: 1 100519
VextoR
  • 5,087
  • 22
  • 74
  • 109
6
votes
1 answer

How to apply XSLT 2.0 transformations in .net?

I understand that the .net XsltCompiledTransformation class supports only XSLT 1.0 transformations and Microsoft has no plans to even introduce support for XSLT 2.0. I've looked at software for performing XSLT 2.0 transformations. The problem is…
Vivian River
  • 31,198
  • 62
  • 198
  • 313
6
votes
3 answers

how to parse the xml inside CDATA of another xml using xslt?

I need to transform the XML inside the CDATA of the XML using the single XSLT. I have an XML as below with xml inside the CDATA as in the below xml.
Shankar
  • 61
  • 1
  • 4
6
votes
3 answers

foreach inside tokenize

This is a snippet from the xml: John A xy Jack B
Shil
  • 211
  • 1
  • 3
  • 11