Extensible Stylesheet Language
Language for xml document Transformations
Mohammad Ashikur Rahman Chowdhury
Senior Software Engineer
BJIT Limited
15.05.2018
2
Overview
•
What is XSL and XSLT
•
Process Architecture
•
XSL transformation engine
•
XSL Template Sample format
•
XSL elements
•
How to use it
− Using programming language (i.e. java)
− Using IDE plugin
•
Examples (template, variable, iteration, condition)
•
References
3
What is XSL and XSL(T)
XSL
XSL (eXtensible Stylesheet Language) is a styling language for XML which
transforms an XML document into other formats like XML, HTML, PDF
etc. It works as a template between source, and the target document.
XSLT (XSL + Transformation)
XSLT stands for XSL Transformations.
XSLT components
•
XPath is a language for navigating in XML documents.
•
XQuery is a language for querying XML documents.
•
XSL - FO is a language for Formatting XML documents (discontinued)
4
Process Architecture
5
Process Architecture
6
XSL transformation Engine
Mostly provided by 3rd
Parties :
4XSLT, IE5, iXSLT, LotusXSL, Transformiix, Resin, Sablotron,
Saxon, Xalan, XML Parser (Oracle), XT
7
XSL Template Sample Format
8
XSL Elements
9
XSL Elements
10
XSL Elements
11
XSL Elements
12
How to use XSL
UsingJavaProgrammingLanguage:
JDKhasbuilt-inXSLtransformationlibrary. Whichcontainsfollowingclasses
andinterfaces:
javax.xml.transform.Result
javax.xml.transform.Source
javax.xml.transform.stream.StreamSource
javax.xml.transform.stream.StreamResult
javax.xml.transform.TransformerFactory
javax.xml.transform.Transformer
13
How to use XSL
UsingIDEplugin:
PlugincanbeusedforXSLbasedXMLdocumenttransformation
N.B. Eclipse has built-in transformation engine
14
How to use XSL
UsingIDEplugin:
15
How to use XSL
UsingIDEplugin:
16
Example
Source XML
17
Example
Target XML
18
Example
XSL template
19
References
•
https://msdn.microsoft.com/en-us/library/ms256058(v=vs.110).aspx
•
https://www.cs.ox.ac.uk/dan.olteanu/tutorials/xslt1.pdf

Extensible stylesheet language (Transformation) or XSLT