SlideShare uma empresa Scribd logo
1 de 41
Extensible Stylesheet Language Jussi Pohjolainen TAMK University of Applied Sciences
XSL ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Relationships with the Languages Extensible Stylesheet Language XSL Transformations XSL Formatting Objects XML Path Language uses
Languages ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Main Idea of XSLT XSLT Processor The XSLT Processor can be client-side (browser) or server-side (php, java..)
Without XSLT - link
With XSLT - link Now the XML document is linked to an external xslt document Browser is used as an XSLT processor. (client-side)
XSLT ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
XSL-FO ,[object Object],[object Object],[object Object]
Example of an 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],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Transforming XSL-FO - document ,[object Object],[object Object],[object Object],[object Object],[object Object]
Example: XSL-FO and Processor XS Processor The possible output formats depends of the features of the XS processor. For example, Apache FOP supports only PDF
Generating FO documents ,[object Object],[object Object],[object Object],[object Object]
Main Idea of XSLT: XML -> XHTML XSLT Processor The XSLT Processor can be client-side (browser) or server-side (php, java..)
Main Idea of XSLT: XML -> FO XSLT Processor Now the books.xml is transformed into XSL FO language...
Example: XSL-FO and Processor XS Processor And if you have an fo-document, you can transform it to pdf (for example)
XSL-FO Process in Whole XS Processor XSLT Processor
Example ,[object Object],[object Object],[object Object],[object Object],[object Object]
XSL-FO Process in Whole FOP PHP
PHP Code ,[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],[object Object],[object Object]
XSLT AND XPATH
Relationships with the Languages Extensible Stylesheet Language XSL Transformations XSL Formatting Objects XML Path Language uses
XPath ,[object Object],[object Object],[object Object],[object Object]
Selecting Nodes? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],XPath
Selecting Nodes (W3schools) Expression Description nodename Selects all child nodes of the named node / Selects from the root node // Selects nodes in the document from the current node that match the selection no matter where they are  . Selects the current node .. Selects the parent of the current node @ Selects attributes
Examples (W3schools) Expression Description /bookstore Selects the root element bookstore bookstore/book Selects all book elements that are children of bookstore //book Selects all book elements no matter where they are in the document bookstore//book Selects all book elements that are descendant of the bookstore element, no matter where they are under the bookstore element //@lang Selects all attributes that are named lang
More Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example of an XSLT-transformation: XML-file ,[object Object],[object Object],[object Object],[object Object],[object Object]
Example of an XSLT-transformation: XSLT-file ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Result: Simple text – file.. ,[object Object]
Making the Transformation ,[object Object],[object Object],[object Object],[object Object],[object Object]
XSLT-transformation with PHP 5 ,[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]
Examples of XSLT ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Examples of XSLT ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Result of Previous XSLT ,[object Object],[object Object],[object Object],[object Object],[object Object],Is this valid xhtml?
Better Version ,[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:value-of select=&quot;XPath&quot;/> ,[object Object],[object Object],[object Object]
for-each ,[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],[object Object],Repeat for every book..
sort ,[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],[object Object],[object Object],Repeat for every book.. ..and sort them by price
Why this doesn't work? ,[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],What's wrong with this line?
Using attribute ,[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],[object Object],[object Object],[object Object]

Mais conteúdo relacionado

Mais procurados

Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
Larry King
 
1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introduction
apnwebdev
 

Mais procurados (20)

XML DTD and Schema
XML DTD and SchemaXML DTD and Schema
XML DTD and Schema
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
 
Eye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easilyEye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easily
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
XSLT presentation
XSLT presentationXSLT presentation
XSLT presentation
 
Html TAGS
Html TAGSHtml TAGS
Html TAGS
 
Basic Html Notes
Basic Html NotesBasic Html Notes
Basic Html Notes
 
Document object model
Document object modelDocument object model
Document object model
 
Understanding THML
Understanding THMLUnderstanding THML
Understanding THML
 
Intro Html
Intro HtmlIntro Html
Intro Html
 
Xhtml
XhtmlXhtml
Xhtml
 
Web html table tags
Web html  table tagsWeb html  table tags
Web html table tags
 
Learning HTML
Learning HTMLLearning HTML
Learning HTML
 
CSS for Beginners
CSS for BeginnersCSS for Beginners
CSS for Beginners
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Html
HtmlHtml
Html
 
Learning Html
Learning HtmlLearning Html
Learning Html
 
1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introduction
 
Html
HtmlHtml
Html
 

Semelhante a Extensible Stylesheet Language

Extensible Stylesheet Language
Extensible Stylesheet LanguageExtensible Stylesheet Language
Extensible Stylesheet Language
Jussi Pohjolainen
 
C:\fakepath\xsl final
C:\fakepath\xsl finalC:\fakepath\xsl final
C:\fakepath\xsl final
shivpriya
 
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
 
Php Simple Xml
Php Simple XmlPhp Simple Xml
Php Simple Xml
mussawir20
 

Semelhante a Extensible Stylesheet Language (20)

Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Inroduction to XSLT with PHP4
Inroduction to XSLT with PHP4Inroduction to XSLT with PHP4
Inroduction to XSLT with PHP4
 
Extensible Stylesheet Language
Extensible Stylesheet LanguageExtensible Stylesheet Language
Extensible Stylesheet Language
 
XMLT
XMLTXMLT
XMLT
 
C:\fakepath\xsl final
C:\fakepath\xsl finalC:\fakepath\xsl final
C:\fakepath\xsl final
 
XML Transformations With PHP
XML Transformations With PHPXML Transformations With PHP
XML Transformations With PHP
 
XML/XSLT
XML/XSLTXML/XSLT
XML/XSLT
 
About XML
About XMLAbout XML
About XML
 
Transforming Xml Data Into Html
Transforming Xml Data Into HtmlTransforming Xml Data Into Html
Transforming Xml Data Into Html
 
XML and XSLT
XML and XSLTXML and XSLT
XML and XSLT
 
XML processing with perl
XML processing with perlXML processing with perl
XML processing with perl
 
Xslt by asfak mahamud
Xslt by asfak mahamudXslt by asfak mahamud
Xslt by asfak mahamud
 
XML
XMLXML
XML
 
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
 
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
XmlXml
Xml
 
5 xsl (formatting xml documents)
5   xsl (formatting xml documents)5   xsl (formatting xml documents)
5 xsl (formatting xml documents)
 
Php Simple Xml
Php Simple XmlPhp Simple Xml
Php Simple Xml
 
"Getting Started with XSLT" presentation slides
"Getting Started with XSLT" presentation slides"Getting Started with XSLT" presentation slides
"Getting Started with XSLT" presentation slides
 
Intro XML for archivists (2011)
Intro XML for archivists (2011)Intro XML for archivists (2011)
Intro XML for archivists (2011)
 

Mais de Jussi Pohjolainen

Advanced JavaScript Development
Advanced JavaScript DevelopmentAdvanced JavaScript Development
Advanced JavaScript Development
Jussi Pohjolainen
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame Animation
Jussi Pohjolainen
 
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and GesturesCreating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Jussi Pohjolainen
 
Creating Games for Asha - platform
Creating Games for Asha - platformCreating Games for Asha - platform
Creating Games for Asha - platform
Jussi Pohjolainen
 

Mais de Jussi Pohjolainen (20)

Moved to Speakerdeck
Moved to SpeakerdeckMoved to Speakerdeck
Moved to Speakerdeck
 
Java Web Services
Java Web ServicesJava Web Services
Java Web Services
 
Box2D and libGDX
Box2D and libGDXBox2D and libGDX
Box2D and libGDX
 
libGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and PreferenceslibGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and Preferences
 
libGDX: Tiled Maps
libGDX: Tiled MapslibGDX: Tiled Maps
libGDX: Tiled Maps
 
libGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame AnimationlibGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame Animation
 
Intro to Building Android Games using libGDX
Intro to Building Android Games using libGDXIntro to Building Android Games using libGDX
Intro to Building Android Games using libGDX
 
Advanced JavaScript Development
Advanced JavaScript DevelopmentAdvanced JavaScript Development
Advanced JavaScript Development
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
libGDX: Scene2D
libGDX: Scene2DlibGDX: Scene2D
libGDX: Scene2D
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame Animation
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame Animation
 
libGDX: User Input
libGDX: User InputlibGDX: User Input
libGDX: User Input
 
Implementing a Simple Game using libGDX
Implementing a Simple Game using libGDXImplementing a Simple Game using libGDX
Implementing a Simple Game using libGDX
 
Building Android games using LibGDX
Building Android games using LibGDXBuilding Android games using LibGDX
Building Android games using LibGDX
 
Android Threading
Android ThreadingAndroid Threading
Android Threading
 
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and GesturesCreating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
 
Creating Games for Asha - platform
Creating Games for Asha - platformCreating Games for Asha - platform
Creating Games for Asha - platform
 
Intro to Asha UI
Intro to Asha UIIntro to Asha UI
Intro to Asha UI
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

Extensible Stylesheet Language

  • 1. Extensible Stylesheet Language Jussi Pohjolainen TAMK University of Applied Sciences
  • 2.
  • 3. Relationships with the Languages Extensible Stylesheet Language XSL Transformations XSL Formatting Objects XML Path Language uses
  • 4.
  • 5. Main Idea of XSLT XSLT Processor The XSLT Processor can be client-side (browser) or server-side (php, java..)
  • 7. With XSLT - link Now the XML document is linked to an external xslt document Browser is used as an XSLT processor. (client-side)
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. Example: XSL-FO and Processor XS Processor The possible output formats depends of the features of the XS processor. For example, Apache FOP supports only PDF
  • 13.
  • 14. Main Idea of XSLT: XML -> XHTML XSLT Processor The XSLT Processor can be client-side (browser) or server-side (php, java..)
  • 15. Main Idea of XSLT: XML -> FO XSLT Processor Now the books.xml is transformed into XSL FO language...
  • 16. Example: XSL-FO and Processor XS Processor And if you have an fo-document, you can transform it to pdf (for example)
  • 17. XSL-FO Process in Whole XS Processor XSLT Processor
  • 18.
  • 19. XSL-FO Process in Whole FOP PHP
  • 20.
  • 22. Relationships with the Languages Extensible Stylesheet Language XSL Transformations XSL Formatting Objects XML Path Language uses
  • 23.
  • 24.
  • 25. Selecting Nodes (W3schools) Expression Description nodename Selects all child nodes of the named node / Selects from the root node // Selects nodes in the document from the current node that match the selection no matter where they are . Selects the current node .. Selects the parent of the current node @ Selects attributes
  • 26. Examples (W3schools) Expression Description /bookstore Selects the root element bookstore bookstore/book Selects all book elements that are children of bookstore //book Selects all book elements no matter where they are in the document bookstore//book Selects all book elements that are descendant of the bookstore element, no matter where they are under the bookstore element //@lang Selects all attributes that are named lang
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.