SlideShare ist ein Scribd-Unternehmen logo
1 von 38
XML Transformations Anitha Reddy
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
URI ,[object Object],[object Object],[object Object],[object Object]
Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],XSL-FO XSL FAMILY
XSL & co ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
XSLT Advantages & Disadvantages ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
XSLT and Java ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
XML Transformation Example hello.xml hello.xsl HTML, XML etc
How XSLT works ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
<?xml version=&quot;1.0&quot; ?> <!-- hello.xml --> <?xml:stylesheet type=&quot;text/xsl&quot; href=&quot;hello.xsl&quot;?> <myMessage> <message> Hello XSLT! </message> </myMessage> <html> <body> <h1> Hello XSLT! </h1> </body> </html> <?xml version=&quot;1.0&quot; ?> <!-- hello.xsl --> <xsl:stylesheet version=&quot;1.0&quot;  xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;> <xsl:template match=&quot; myMessage &quot;> <html><body> <h1> <xsl:value-of select=&quot;message&quot;/> </h1> </body></html> </xsl:template> </xsl:stylesheet>
Transform.java ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Any InputStream / String Any OutputStream / String
XPath ,[object Object],[object Object],[object Object],[object Object],[object Object]
Location Paths ,[object Object],[object Object],[object Object]
Location Paths contd.. ,[object Object],[object Object],[object Object],[object Object],[object Object]
Location Paths contd.. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Location Paths contd.. ,[object Object],[object Object],[object Object],[object Object]
Location Paths contd.. ,[object Object]
Location Paths contd.. ,[object Object],[object Object]
Location Paths contd.. ,[object Object],[object Object]
Location Paths contd.. ,[object Object],[object Object]
[object Object],[object Object],Location Paths contd.. //GGG/ancestor::*   //GGG/descendant::*  //GGG/following::*  //GGG/preceding::*  //GGG/self::*
Xpath Functions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
XSLT Stylesheet Elements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
XSLT template Element ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
XSLT value-of Element ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
XSLT for-each Element ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
XSLT if Element ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
XSLT choose Element ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
XSL-FO
What is XSL-FO ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
XSL-FO structure ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
XSL-FO document  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Current FO implementations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
XSL-FO Production process XSLT to  FO FO Impl. <mydoc> … <p> Hello </p> … </mydoc> Source XML Document <fo:root> … <fo:block> Hello </fo:block> … </fo:root> Generated FO Instance Hello 1 Rendered Pages
AltovaXML Spy ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
XMLSPY in action
References ,[object Object],[object Object],[object Object]
A Q &

Weitere ähnliche Inhalte

Was ist angesagt?

Displaying XML Documents Using CSS and XSL
Displaying XML Documents Using CSS and XSLDisplaying XML Documents Using CSS and XSL
Displaying XML Documents Using CSS and XSL
Bình Trọng Án
 
C:\fakepath\xsl final
C:\fakepath\xsl finalC:\fakepath\xsl final
C:\fakepath\xsl final
shivpriya
 

Was ist angesagt? (20)

XSLT. Basic.
XSLT. Basic.XSLT. Basic.
XSLT. Basic.
 
Introduction to XSLT
Introduction to XSLTIntroduction to XSLT
Introduction to XSLT
 
XSLT and XPath - without the pain!
XSLT and XPath - without the pain!XSLT and XPath - without the pain!
XSLT and XPath - without the pain!
 
5 xsl (formatting xml documents)
5   xsl (formatting xml documents)5   xsl (formatting xml documents)
5 xsl (formatting xml documents)
 
XSLT
XSLTXSLT
XSLT
 
Querring xml with xpath
Querring xml with xpath Querring xml with xpath
Querring xml with xpath
 
Learning XSLT
Learning XSLTLearning XSLT
Learning XSLT
 
XSLT
XSLTXSLT
XSLT
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Displaying XML Documents Using CSS and XSL
Displaying XML Documents Using CSS and XSLDisplaying XML Documents Using CSS and XSL
Displaying XML Documents Using CSS and XSL
 
C:\fakepath\xsl final
C:\fakepath\xsl finalC:\fakepath\xsl final
C:\fakepath\xsl final
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
 
Xml
XmlXml
Xml
 
Xml presentation
Xml presentationXml presentation
Xml presentation
 
Xml p5 Lecture Notes
Xml p5 Lecture NotesXml p5 Lecture Notes
Xml p5 Lecture Notes
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Xml
XmlXml
Xml
 
XML Schema
XML SchemaXML Schema
XML Schema
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Introduction to xml
Introduction to xmlIntroduction to xml
Introduction to xml
 

Ähnlich wie XMLT

Extensible Stylesheet Language
Extensible Stylesheet LanguageExtensible Stylesheet Language
Extensible Stylesheet Language
Jussi Pohjolainen
 
XML processing with perl
XML processing with perlXML processing with perl
XML processing with perl
Joe Jiang
 
Xml For Dummies Chapter 12 Handling Transformations With Xsl it-slideshares...
Xml For Dummies   Chapter 12 Handling Transformations With Xsl it-slideshares...Xml For Dummies   Chapter 12 Handling Transformations With Xsl it-slideshares...
Xml For Dummies Chapter 12 Handling Transformations With Xsl it-slideshares...
phanleson
 
Web Services Part 1
Web Services Part 1Web Services Part 1
Web Services Part 1
patinijava
 

Ähnlich wie XMLT (20)

Xml Schema
Xml SchemaXml Schema
Xml Schema
 
Inroduction to XSLT with PHP4
Inroduction to XSLT with PHP4Inroduction to XSLT with PHP4
Inroduction to XSLT with PHP4
 
X Path
X PathX Path
X Path
 
Transforming Xml Data Into Html
Transforming Xml Data Into HtmlTransforming Xml Data Into Html
Transforming Xml Data Into Html
 
Introduction To Xml
Introduction To XmlIntroduction To Xml
Introduction To Xml
 
Extensible Stylesheet Language
Extensible Stylesheet LanguageExtensible Stylesheet Language
Extensible Stylesheet Language
 
Xml
XmlXml
Xml
 
3 xml namespaces and xml schema
3   xml namespaces and xml schema3   xml namespaces and xml schema
3 xml namespaces and xml schema
 
What is xml
What is xmlWhat is xml
What is xml
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Processing XML with Java
Processing XML with JavaProcessing XML with Java
Processing XML with Java
 
XML processing with perl
XML processing with perlXML processing with perl
XML processing with perl
 
Xml
XmlXml
Xml
 
Xml
XmlXml
Xml
 
Xml For Dummies Chapter 12 Handling Transformations With Xsl it-slideshares...
Xml For Dummies   Chapter 12 Handling Transformations With Xsl it-slideshares...Xml For Dummies   Chapter 12 Handling Transformations With Xsl it-slideshares...
Xml For Dummies Chapter 12 Handling Transformations With Xsl it-slideshares...
 
XML and Web Services with PHP5 and PEAR
XML and Web Services with PHP5 and PEARXML and Web Services with PHP5 and PEAR
XML and Web Services with PHP5 and PEAR
 
About XML
About XMLAbout XML
About XML
 
Week 12 xml and xsl
Week 12 xml and xslWeek 12 xml and xsl
Week 12 xml and xsl
 
Sax Dom Tutorial
Sax Dom TutorialSax Dom Tutorial
Sax Dom Tutorial
 
Web Services Part 1
Web Services Part 1Web Services Part 1
Web Services Part 1
 

XMLT

  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. XML Transformation Example hello.xml hello.xsl HTML, XML etc
  • 9.
  • 10. <?xml version=&quot;1.0&quot; ?> <!-- hello.xml --> <?xml:stylesheet type=&quot;text/xsl&quot; href=&quot;hello.xsl&quot;?> <myMessage> <message> Hello XSLT! </message> </myMessage> <html> <body> <h1> Hello XSLT! </h1> </body> </html> <?xml version=&quot;1.0&quot; ?> <!-- hello.xsl --> <xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;> <xsl:template match=&quot; myMessage &quot;> <html><body> <h1> <xsl:value-of select=&quot;message&quot;/> </h1> </body></html> </xsl:template> </xsl:stylesheet>
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34. XSL-FO Production process XSLT to FO FO Impl. <mydoc> … <p> Hello </p> … </mydoc> Source XML Document <fo:root> … <fo:block> Hello </fo:block> … </fo:root> Generated FO Instance Hello 1 Rendered Pages
  • 35.
  • 37.
  • 38. A Q &