SlideShare a Scribd company logo
XML DATA
TRANSFORMATION
• XML was first introduced as a metalanguage for data
description.
• A metalanguage represents a well-defined interface that
evolves and is transformed into derived languages. XML is
simply the foundation interface for a number of specific
markup languages, each of which is based on its own
vocabulary and schema.
• The schema syntactically differentiates XML languages from
each other. XML is key for data exchange and interoperability,
and the schema is essential for providing XML documents with
a typed and well-defined structure. Unfortunately, in the
imperfect world in which we live, schemas often express the
same semantics through different syntaxes.
• An XML transformation is simply the XML workaround for this
relatively common
situation. An XML transformation is a user-defined algorithm that
attempts to express
the semantics of a given document using another equivalent syntax. A
transformation is much like a type cast in programming. You can
always try to coerce the type, but in
doing so you could face and accept compromises like syntax
adaptations and,
sometimes, loss of data and logic.
• In XML, the transformation process is seen as the application of a
style sheet to the
source document. The style sheet is a declarative and user-defined
document that is
referred to as extensible. The term Extensible Stylesheet Language
(XSL) indicates a
metalanguage designed for expressing style sheets for XML
documents. An XSL file
contains the set of rules that will be used to transform a document into
another,
• XSL files were originally conceived as the XML counterpart of HTML's
cascading style
sheets (CSS). In this context, XSL files were simply extensible and user-
definable tools
to render an XML markup in HTML for display purposes. The growing
complexity of
style sheets, as well as the advent of XML schemas, changed the
perspective of XSL
and led to XSL Transformations (XSLT).
• The goal of XSL has evolved over time. Today, XSL is a blanket
term for a number of derived technologies that altogether
better qualify and implement the original idea of styling XML
documents. The various components that fall under the
umbrella of XSL are the actual software entities that you use in
your code:
• XSLT Rule-based language for transforming XML documents
into any other
text-based format. XSLT provides for XML-to-XML
transformation, which
mostly means schema transformation. An XSLT program is a
generic set of
transformation rules whose output can be any text-based
language,
including HTML, Rich Text Format (RTF), and Wireless Markup
• XPath Query language that XSLT programs use to select specific
parts of an
XML document. The result of XPath expressions is then parsed
and
elaborated by the XSLT processor
• XSL Formatting Objects (XSL-FO) Advanced styling features
expressed by
• an XML vocabulary that define the semantics of a set of
formatting
• elements
XSLT TEMPLATE PROGRAMMING
XSLT is a process that combines two XML documents—the XML source
file and the style sheet—to produce a third document. The resultant
document can be an XML document, an HTML page, or any text-based
file the style sheet has been instructed to generate.
The source document must meet only one requirement: it must be a
well-formed XML
document. The style sheet must be a valid XML document that contains
the transformation logic expressed using the elements in the XSLT
vocabulary. An XSLT
style sheet can be seen as a sequence of templates.
AN OVERVIEW OF THE XSLT PROCESS
• The core part of the transformation process is the application
of templates to XML source elements. Other ancillary steps
might include the expansion of elements to text, the execution
of some script code, and the selection of a subset of nodes
using Xpath queries. The layout of a generic XSLT script is
shown here:
• <xsl:stylesheet
• xmlns:xsl="http://www.w3.org/1999/xsl/transform">
• <xsl:template match="/">
• ⋮
• </xsl:template>
• <xsl:template match="...">
• ⋮
• </xsl:template>
• ⋮
• </xsl:stylesheet>
• The final output of each template must form a syntactically valid fragment in
the target
• language—be it XML, HTML, RTF, or some other language. You are not
required to
• indicate the target language explicitly, although the XSLT vocabulary
provides a tailormade
• instruction to declare what the expected output will be. The main
requirement for
• the XSLT style sheet is that its overall text be well-formed XML. In addition,
it must
• make syntactically correct use of all the XSLT instructions it needs. The
APPLYING AN XSLT TEMPLATE TO SOURCE
MARKUP TEXT.
XSLT INSTRUCTIONS
• The XSLT vocabulary consists of special tags that represent particular
operations you
• can perform on the source markup text or passed arguments.
Although the overall
• syntax is that of a rigorous XML dialect, you can easily recognize the
main constructs of a high-level programming language.
• The following subsections summarize the main XSLT instructions you
are likely to run
• across in your XSLT experience. The XSLT instructions are divided
into four categories:
Xml data transformation
THE STYLE SHEET IS FIRST NORMALIZED TO
AN XPATH NAVIGATOR AND THEN
COMPILED
MANAGING THE PROCESSOR'S STATE
• The style sheet compiler populates three internal data
structures with the data read from the source.
PERFORMING TRANSFORMATIONS
FURTHER READING:
• http://www.w3.org/TR/xslt

More Related Content

What's hot (20)

PPT
10. XML in DBMS
koolkampus
 
PPT
Introduction to XML
Jussi Pohjolainen
 
PDF
Introduction to XML and Databases
torp42
 
PPT
Introduction to XML
Fazli Kabashi
 
ODP
XML
Osama Qunoo
 
PPT
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xml
Ông Thông
 
PPT
Xml 215-presentation
Manish Chaurasia
 
PDF
XML Introduction
Marco Bresciani
 
PPT
Introduction to XML
BG Java EE Course
 
PPT
uptu web technology unit 2 Xml2
Abhishek Kesharwani
 
PPTX
Extensible Markup Language (XML)
AakankshaR
 
PPTX
Xml ppt
seemadav1
 
PPTX
Xml applications
Nabahat Tahir
 
PPTX
Web programming xml
Uma mohan
 
10. XML in DBMS
koolkampus
 
Introduction to XML
Jussi Pohjolainen
 
Introduction to XML and Databases
torp42
 
Introduction to XML
Fazli Kabashi
 
Xml theory 2005_[ngohaianh.info]_1_introduction-to-xml
Ông Thông
 
Xml 215-presentation
Manish Chaurasia
 
XML Introduction
Marco Bresciani
 
Introduction to XML
BG Java EE Course
 
uptu web technology unit 2 Xml2
Abhishek Kesharwani
 
Extensible Markup Language (XML)
AakankshaR
 
Xml ppt
seemadav1
 
Xml applications
Nabahat Tahir
 
Web programming xml
Uma mohan
 

Similar to Xml data transformation (20)

PPTX
web technology basics in detail about .pptx
ManimaranMagesh
 
PDF
E05412327
IOSR-JEN
 
PPTX
XSLT - Extensible StyleSheet Language Transformations.pptx
abhishekoza1981
 
PPS
eXtensible Markup Language
Aditya Raj
 
PPT
XML/XSLT
thinkahead.net
 
PDF
Tutor Xml Gxs
nit Allahabad
 
PPTX
Xml programming language myassignmenthelp.net
www.myassignmenthelp.net
 
PPTX
Introduction to XSLT
Mahmoud Allam
 
PDF
Module 5 XML Notes.pdf
ssuser21721b
 
PPT
Extensible stylesheet language (Transformation) or XSLT
Ashikur Rahman
 
PDF
Introduction to xml
soumya
 
PPT
Xml iet 2015
kiransurariya
 
PPTX
Xml unit1
sathyasudha
 
PPTX
XML1.pptx
53ShaikhImadoddin
 
PPTX
XML
eewiley
 
PDF
Markup For Dummies (Russ Ward)
STC-Philadelphia Metro Chapter
 
PPTX
XSLT
Kamal Acharya
 
PPTX
Applied xml programming for microsoft
Raghu nath
 
web technology basics in detail about .pptx
ManimaranMagesh
 
E05412327
IOSR-JEN
 
XSLT - Extensible StyleSheet Language Transformations.pptx
abhishekoza1981
 
eXtensible Markup Language
Aditya Raj
 
XML/XSLT
thinkahead.net
 
Tutor Xml Gxs
nit Allahabad
 
Xml programming language myassignmenthelp.net
www.myassignmenthelp.net
 
Introduction to XSLT
Mahmoud Allam
 
Module 5 XML Notes.pdf
ssuser21721b
 
Extensible stylesheet language (Transformation) or XSLT
Ashikur Rahman
 
Introduction to xml
soumya
 
Xml iet 2015
kiransurariya
 
Xml unit1
sathyasudha
 
XML
eewiley
 
Markup For Dummies (Russ Ward)
STC-Philadelphia Metro Chapter
 
Applied xml programming for microsoft
Raghu nath
 
Ad

More from Raghu nath (20)

PPTX
Mongo db
Raghu nath
 
PDF
Ftp (file transfer protocol)
Raghu nath
 
PDF
MS WORD 2013
Raghu nath
 
PDF
Msword
Raghu nath
 
PDF
Ms word
Raghu nath
 
PDF
Javascript part1
Raghu nath
 
PDF
Regular expressions
Raghu nath
 
PDF
Selection sort
Raghu nath
 
PPTX
Binary search
Raghu nath
 
PPTX
JSON(JavaScript Object Notation)
Raghu nath
 
PDF
Stemming algorithms
Raghu nath
 
PPTX
Step by step guide to install dhcp role
Raghu nath
 
PPTX
Network essentials chapter 4
Raghu nath
 
PPTX
Network essentials chapter 3
Raghu nath
 
PPTX
Network essentials chapter 2
Raghu nath
 
PPTX
Network essentials - chapter 1
Raghu nath
 
PPTX
Python chapter 2
Raghu nath
 
PPTX
python chapter 1
Raghu nath
 
PPTX
Linux Shell Scripting
Raghu nath
 
PPTX
Perl
Raghu nath
 
Mongo db
Raghu nath
 
Ftp (file transfer protocol)
Raghu nath
 
MS WORD 2013
Raghu nath
 
Msword
Raghu nath
 
Ms word
Raghu nath
 
Javascript part1
Raghu nath
 
Regular expressions
Raghu nath
 
Selection sort
Raghu nath
 
Binary search
Raghu nath
 
JSON(JavaScript Object Notation)
Raghu nath
 
Stemming algorithms
Raghu nath
 
Step by step guide to install dhcp role
Raghu nath
 
Network essentials chapter 4
Raghu nath
 
Network essentials chapter 3
Raghu nath
 
Network essentials chapter 2
Raghu nath
 
Network essentials - chapter 1
Raghu nath
 
Python chapter 2
Raghu nath
 
python chapter 1
Raghu nath
 
Linux Shell Scripting
Raghu nath
 
Ad

Recently uploaded (20)

PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PPTX
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
PPTX
Quarter1-English3-W4-Identifying Elements of the Story
FLORRACHELSANTOS
 
PDF
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
PPTX
How to Set Maximum Difference Odoo 18 POS
Celine George
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PPTX
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PPSX
Health Planning in india - Unit 03 - CHN 2 - GNM 3RD YEAR.ppsx
Priyanshu Anand
 
PPTX
Soil and agriculture microbiology .pptx
Keerthana Ramesh
 
PPTX
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PPTX
Mathematics 5 - Time Measurement: Time Zone
menchreo
 
PPTX
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
Quarter1-English3-W4-Identifying Elements of the Story
FLORRACHELSANTOS
 
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
How to Set Maximum Difference Odoo 18 POS
Celine George
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
Health Planning in india - Unit 03 - CHN 2 - GNM 3RD YEAR.ppsx
Priyanshu Anand
 
Soil and agriculture microbiology .pptx
Keerthana Ramesh
 
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
Mathematics 5 - Time Measurement: Time Zone
menchreo
 
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 

Xml data transformation

  • 2. • XML was first introduced as a metalanguage for data description. • A metalanguage represents a well-defined interface that evolves and is transformed into derived languages. XML is simply the foundation interface for a number of specific markup languages, each of which is based on its own vocabulary and schema.
  • 3. • The schema syntactically differentiates XML languages from each other. XML is key for data exchange and interoperability, and the schema is essential for providing XML documents with a typed and well-defined structure. Unfortunately, in the imperfect world in which we live, schemas often express the same semantics through different syntaxes.
  • 4. • An XML transformation is simply the XML workaround for this relatively common situation. An XML transformation is a user-defined algorithm that attempts to express the semantics of a given document using another equivalent syntax. A transformation is much like a type cast in programming. You can always try to coerce the type, but in doing so you could face and accept compromises like syntax adaptations and, sometimes, loss of data and logic.
  • 5. • In XML, the transformation process is seen as the application of a style sheet to the source document. The style sheet is a declarative and user-defined document that is referred to as extensible. The term Extensible Stylesheet Language (XSL) indicates a metalanguage designed for expressing style sheets for XML documents. An XSL file contains the set of rules that will be used to transform a document into another,
  • 6. • XSL files were originally conceived as the XML counterpart of HTML's cascading style sheets (CSS). In this context, XSL files were simply extensible and user- definable tools to render an XML markup in HTML for display purposes. The growing complexity of style sheets, as well as the advent of XML schemas, changed the perspective of XSL and led to XSL Transformations (XSLT).
  • 7. • The goal of XSL has evolved over time. Today, XSL is a blanket term for a number of derived technologies that altogether better qualify and implement the original idea of styling XML documents. The various components that fall under the umbrella of XSL are the actual software entities that you use in your code:
  • 8. • XSLT Rule-based language for transforming XML documents into any other text-based format. XSLT provides for XML-to-XML transformation, which mostly means schema transformation. An XSLT program is a generic set of transformation rules whose output can be any text-based language, including HTML, Rich Text Format (RTF), and Wireless Markup
  • 9. • XPath Query language that XSLT programs use to select specific parts of an XML document. The result of XPath expressions is then parsed and elaborated by the XSLT processor
  • 10. • XSL Formatting Objects (XSL-FO) Advanced styling features expressed by • an XML vocabulary that define the semantics of a set of formatting • elements
  • 11. XSLT TEMPLATE PROGRAMMING XSLT is a process that combines two XML documents—the XML source file and the style sheet—to produce a third document. The resultant document can be an XML document, an HTML page, or any text-based file the style sheet has been instructed to generate. The source document must meet only one requirement: it must be a well-formed XML document. The style sheet must be a valid XML document that contains the transformation logic expressed using the elements in the XSLT vocabulary. An XSLT style sheet can be seen as a sequence of templates.
  • 12. AN OVERVIEW OF THE XSLT PROCESS
  • 13. • The core part of the transformation process is the application of templates to XML source elements. Other ancillary steps might include the expansion of elements to text, the execution of some script code, and the selection of a subset of nodes using Xpath queries. The layout of a generic XSLT script is shown here:
  • 14. • <xsl:stylesheet • xmlns:xsl="http://www.w3.org/1999/xsl/transform"> • <xsl:template match="/"> • ⋮ • </xsl:template> • <xsl:template match="..."> • ⋮ • </xsl:template> • ⋮ • </xsl:stylesheet>
  • 15. • The final output of each template must form a syntactically valid fragment in the target • language—be it XML, HTML, RTF, or some other language. You are not required to • indicate the target language explicitly, although the XSLT vocabulary provides a tailormade • instruction to declare what the expected output will be. The main requirement for • the XSLT style sheet is that its overall text be well-formed XML. In addition, it must • make syntactically correct use of all the XSLT instructions it needs. The
  • 16. APPLYING AN XSLT TEMPLATE TO SOURCE MARKUP TEXT.
  • 17. XSLT INSTRUCTIONS • The XSLT vocabulary consists of special tags that represent particular operations you • can perform on the source markup text or passed arguments. Although the overall • syntax is that of a rigorous XML dialect, you can easily recognize the main constructs of a high-level programming language. • The following subsections summarize the main XSLT instructions you are likely to run • across in your XSLT experience. The XSLT instructions are divided into four categories:
  • 19. THE STYLE SHEET IS FIRST NORMALIZED TO AN XPATH NAVIGATOR AND THEN COMPILED
  • 20. MANAGING THE PROCESSOR'S STATE • The style sheet compiler populates three internal data structures with the data read from the source.