SlideShare une entreprise Scribd logo
1  sur  64
XSLT Md. Asfak Mahamud Associate Software Engineer KAZ Software Ltd. Dhaka, Bangladesh February 19, 2008
Agenda ,[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],It’s Wonderful Life James Stewart  Donna Reed  Lionel Barrymore  Frank Capra Liberty Film Inc.
Agenda ,[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],It’s Wonderful Life James Stewart  Donna Reed  Lionel Barrymore  Frank Capra Liberty Film Inc.
Trailer (continued) XSLT processor hello.xml hello.xsl hello.html
Trailer (continued) XSLT processor
Trailer (continued) Transform.java
Trailer (continued) Streamsource  of XSL File XSL File StreamSource  of XML File XML File transformer StreamResult of Html File
Trailer (continued) Streamsource  of XSL File XSL File StreamSource  of XML File XML File StreamResult of Html File Html File StreamSource  of XML File StreamResult of Html File
Trailer (continued) TransformerFactory   tFactory   = TransformerFactory. newInstance (); StreamSource   xslStreamSource   = new StreamSource(xslDoc); Transformer   transformer   = tFactory.newTransformer(stylesource); StreamSource   xmlStreamSource   = new StreamSource(new File(xmlDoc)); StreamResult   htmlStreamResult   = new StreamResult(new FileOutputStream(htmlDoc)); transformer.transform ( xmlStreamSource ,  htmlStreamResult );
Agenda ,[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],It’s Wonderful Life James Stewart  Donna Reed  Lionel Barrymore  Frank Capra Liberty Film Inc.
Cast   XML ,[object Object],[object Object]
Cast   XML
Cast   XML
Cast   XML  with CSS
Cast   XML  with XSL
Cast ,[object Object]
Cast   XPath
Cast   XPath
Cast   XPath
Cast   XPath
Cast   XPath
Cast   XPath
Cast   XPath
Cast ,[object Object]
Cast   XSL/XSLT
Cast   XSL/XSLT ,[object Object]
Cast   XSL/XSLT
Cast   XSL/XSLT  Functions ,[object Object],[object Object]
Cast   XSL/XSLT ,[object Object]
Cast   XSL/XSLT ,[object Object]
Cast   XSL/XSLT ,[object Object]
Cast   XSL/XSLT ,[object Object]
[object Object],Cast   XSL/XSLT
[object Object],[object Object],Cast   XSL/XSLT
[object Object],Cast   XSL/XSLT
Cast   XSL/XSLT
[object Object],Cast   XSL/XSLT
[object Object],[object Object],[object Object],Cast   XSL/XSLT
Two Important Functions: Boolean element-available(string) Boolean function-available(string) Cast   XSL/XSLT
Cast   XSL/XSLT  Extention-Elements
Example: Generating multiple output file
Cast   XSL/XSLT   Extention Function ,[object Object],[object Object],[object Object],[object Object],[object Object]
To write a stylesheet that will work with multiple XSLT processors? <xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=“ http://www.w3.org/1999/XSL/Transform ”     xmlns:redirect =&quot; org.apache.xalan.xslt.extensions.Redirect &quot;    xmlns:saxon =&quot; http://icl.com/saxon &quot;    xmlns:xt =&quot; http://www.jclark.com/xt &quot;    extension-element-prefixes =&quot; redirect saxon xt &quot; > Cast   XSL/XSLT
Writing extensions in other languages Cast   XSL/XSLT <lxslt:component prefix=&quot;javascript-extension“ functions=&quot;cos sin toRadians&quot;> <lxslt:script lang=&quot;javascript&quot;> function cos(d) {  return Math.cos(d);  } function sin(d) {  return Math.sin(d);  } function toRadians(d) {  return d * Math.PI / 180;  }  </lxslt:script> </lxslt:component>
Fallback Processing Cast   XSL/XSLT
Agenda ,[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],It’s Wonderful Life James Stewart  Donna Reed  Lionel Barrymore  Frank Capra Liberty Film Inc.
Director   XSLT Processors ,[object Object],[object Object],[object Object]
Director   Java API ,[object Object],[object Object],[object Object]
Producer   Transformation
Agenda ,[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],It’s Wonderful Life James Stewart  Donna Reed  Lionel Barrymore  Frank Capra Liberty Film Inc.
Production ,[object Object],[object Object]
Agenda ,[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],It’s Wonderful Life James Stewart  Donna Reed  Lionel Barrymore  Frank Capra Liberty Film Inc.
Discussion ,[object Object],[object Object],[object Object],[object Object],[object Object]
Discussion  XSLT 2.0 - Grouping <paper> <title> XML and PDF in Publishing Workflows</title> <author> Myers, Charles </author> </paper> <paper> <title> On the Way to XML</title> <author> Parsons, Jonathan </author> <author> Caisley, Phil </author> </paper> <author> <name>Caisley, Phil</name> <paper> On the Way to XML </paper> </author> <author> <name>Myers, Charles</name> <paper> XML and PDF in Publishing Workflows </paper> </author> <author> <name> Parsons, Jonathan</name> <paper> On the Way to XML </paper> </author>
Discussion  XSLT 2.0 - Grouping ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
<paper> <title> XML and PDF in Publishing Workflows</title> <author> Myers, Charles </author> </paper> <paper> <title> On the Way to XML</title> <author> Parsons, Jonathan </author> <author> Caisley, Phil </author> </paper> <author> <name>Caisley, Phil</name> <paper> On the Way to XML </paper> </author> <author> <name>Myers, Charles</name> <paper> XML and PDF in Publishing Workflows </paper> </author> <author> <name> Parsons, Jonathan</name> <paper> On the Way to XML </paper> </author> <xsl:for-each-group  select= &quot;paper&quot; group-by= &quot;author&quot; > <xsl:sort select=&quot;current-grouping-key()&quot; /> <author> <name> <xsl:value-of select=&quot;current-grouping-key()&quot; /> </name> <xsl:for-each select=&quot;current-group()&quot;> <paper> <xsl:value-of select=&quot;title&quot; /> </paper> </xsl:for-each> </author> </xsl:for-each-group>
Discussion  XSLT 2.0 - Function Definitions
Discussion  XSLT 2.0 -  Multiple Result Documents ,[object Object],[object Object],<xsl:for-each select=&quot;section&quot;> <xsl:result-document href=&quot;{@id}.html&quot;> <xsl:apply-templates select=&quot;.&quot;  mode=&quot;html&quot; /> </xsl:result-document> </xsl:for-each>
Discussion  XSLT 2.0 -  Typing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Discussion  XSLT 2.0 -  Typing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],<xsl:function name=&quot;math:power&quot;> <xsl:param name=&quot;base&quot; as=&quot;xs:decimal&quot; /> <xsl:param name=&quot;power&quot; as=&quot;xs:integer&quot; /> … </xsl:function>
[object Object]
Discussion XSLT Advantages & Disadvantages ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
References ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 

Contenu connexe

Tendances (20)

XSLT and XPath - without the pain!
XSLT and XPath - without the pain!XSLT and XPath - without the pain!
XSLT and XPath - without the pain!
 
XSLT
XSLTXSLT
XSLT
 
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
 
5 xsl (formatting xml documents)
5   xsl (formatting xml documents)5   xsl (formatting xml documents)
5 xsl (formatting xml documents)
 
XSLT presentation
XSLT presentationXSLT presentation
XSLT presentation
 
Xslt
XsltXslt
Xslt
 
Xslt
XsltXslt
Xslt
 
transforming xml using xsl and xslt
transforming xml using xsl and xslttransforming xml using xsl and xslt
transforming xml using xsl and xslt
 
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
 
Xml p5 Lecture Notes
Xml p5 Lecture NotesXml p5 Lecture Notes
Xml p5 Lecture Notes
 
C:\fakepath\xsl final
C:\fakepath\xsl finalC:\fakepath\xsl final
C:\fakepath\xsl final
 
Xml Lecture Notes
Xml Lecture NotesXml Lecture Notes
Xml Lecture Notes
 
Extracting data from xml
Extracting data from xmlExtracting data from xml
Extracting data from xml
 
Introductionto xslt
Introductionto xsltIntroductionto xslt
Introductionto xslt
 
03 x files
03 x files03 x files
03 x files
 
Xsd
XsdXsd
Xsd
 
XML, DTD & XSD Overview
XML, DTD & XSD OverviewXML, DTD & XSD Overview
XML, DTD & XSD Overview
 
Xml schema
Xml schemaXml schema
Xml schema
 

Similaire à Xslt by asfak mahamud

Week 12 xml and xsl
Week 12 xml and xslWeek 12 xml and xsl
Week 12 xml and xslhapy
 
Inroduction to XSLT with PHP4
Inroduction to XSLT with PHP4Inroduction to XSLT with PHP4
Inroduction to XSLT with PHP4Stephan Schmidt
 
XML Transformations With PHP
XML Transformations With PHPXML Transformations With PHP
XML Transformations With PHPStephan Schmidt
 
Working With XML in IDS Applications
Working With XML in IDS ApplicationsWorking With XML in IDS Applications
Working With XML in IDS ApplicationsKeshav Murthy
 
Extensible Stylesheet Language
Extensible Stylesheet LanguageExtensible Stylesheet Language
Extensible Stylesheet LanguageJussi Pohjolainen
 
eXtensible Markup Language (XML)
eXtensible Markup Language (XML)eXtensible Markup Language (XML)
eXtensible Markup Language (XML)Serhii Kartashov
 
Sakai09 Osp Preconference Afternoon Forms
Sakai09 Osp Preconference Afternoon FormsSakai09 Osp Preconference Afternoon Forms
Sakai09 Osp Preconference Afternoon FormsSean Keesler
 
Overview of XSL, XPath and XSL-FO
Overview of XSL, XPath and XSL-FOOverview of XSL, XPath and XSL-FO
Overview of XSL, XPath and XSL-FOSuite Solutions
 
Rendering XML Documents
Rendering XML DocumentsRendering XML Documents
Rendering XML Documentsyht4ever
 
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 PEARStephan Schmidt
 
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
 

Similaire à Xslt by asfak mahamud (20)

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
 
Inroduction to XSLT with PHP4
Inroduction to XSLT with PHP4Inroduction to XSLT with PHP4
Inroduction to XSLT with PHP4
 
Session 4
Session 4Session 4
Session 4
 
XML Transformations With PHP
XML Transformations With PHPXML Transformations With PHP
XML Transformations With PHP
 
Java XML Parsing
Java XML ParsingJava XML Parsing
Java XML Parsing
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Xml
XmlXml
Xml
 
Working With XML in IDS Applications
Working With XML in IDS ApplicationsWorking With XML in IDS Applications
Working With XML in IDS Applications
 
Extensible Stylesheet Language
Extensible Stylesheet LanguageExtensible Stylesheet Language
Extensible Stylesheet Language
 
eXtensible Markup Language (XML)
eXtensible Markup Language (XML)eXtensible Markup Language (XML)
eXtensible Markup Language (XML)
 
Stax parser
Stax parserStax parser
Stax parser
 
26xslt
26xslt26xslt
26xslt
 
Processing XML with Java
Processing XML with JavaProcessing XML with Java
Processing XML with Java
 
Sakai09 Osp Preconference Afternoon Forms
Sakai09 Osp Preconference Afternoon FormsSakai09 Osp Preconference Afternoon Forms
Sakai09 Osp Preconference Afternoon Forms
 
Overview of XSL, XPath and XSL-FO
Overview of XSL, XPath and XSL-FOOverview of XSL, XPath and XSL-FO
Overview of XSL, XPath and XSL-FO
 
Rendering XML Documents
Rendering XML DocumentsRendering XML Documents
Rendering XML Documents
 
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
 
PostgreSQL and XML
PostgreSQL and XMLPostgreSQL and XML
PostgreSQL and 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...
 

Dernier

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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 Processorsdebabhi2
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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...Martijn de Jong
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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 textsMaria Levchenko
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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?Igalia
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Dernier (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Xslt by asfak mahamud

  • 1. XSLT Md. Asfak Mahamud Associate Software Engineer KAZ Software Ltd. Dhaka, Bangladesh February 19, 2008
  • 2.
  • 3.
  • 4. Trailer (continued) XSLT processor hello.xml hello.xsl hello.html
  • 7. Trailer (continued) Streamsource of XSL File XSL File StreamSource of XML File XML File transformer StreamResult of Html File
  • 8. Trailer (continued) Streamsource of XSL File XSL File StreamSource of XML File XML File StreamResult of Html File Html File StreamSource of XML File StreamResult of Html File
  • 9. Trailer (continued) TransformerFactory tFactory = TransformerFactory. newInstance (); StreamSource xslStreamSource = new StreamSource(xslDoc); Transformer transformer = tFactory.newTransformer(stylesource); StreamSource xmlStreamSource = new StreamSource(new File(xmlDoc)); StreamResult htmlStreamResult = new StreamResult(new FileOutputStream(htmlDoc)); transformer.transform ( xmlStreamSource , htmlStreamResult );
  • 10.
  • 11.
  • 12. Cast XML
  • 13. Cast XML
  • 14. Cast XML with CSS
  • 15. Cast XML with XSL
  • 16.
  • 17. Cast XPath
  • 18. Cast XPath
  • 19. Cast XPath
  • 20. Cast XPath
  • 21. Cast XPath
  • 22. Cast XPath
  • 23. Cast XPath
  • 24.
  • 25. Cast XSL/XSLT
  • 26.
  • 27. Cast XSL/XSLT
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36. Cast XSL/XSLT
  • 37.
  • 38.
  • 39. Two Important Functions: Boolean element-available(string) Boolean function-available(string) Cast XSL/XSLT
  • 40. Cast XSL/XSLT Extention-Elements
  • 42.
  • 43. To write a stylesheet that will work with multiple XSLT processors? <xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=“ http://www.w3.org/1999/XSL/Transform ”  xmlns:redirect =&quot; org.apache.xalan.xslt.extensions.Redirect &quot;  xmlns:saxon =&quot; http://icl.com/saxon &quot;  xmlns:xt =&quot; http://www.jclark.com/xt &quot;  extension-element-prefixes =&quot; redirect saxon xt &quot; > Cast XSL/XSLT
  • 44. Writing extensions in other languages Cast XSL/XSLT <lxslt:component prefix=&quot;javascript-extension“ functions=&quot;cos sin toRadians&quot;> <lxslt:script lang=&quot;javascript&quot;> function cos(d) { return Math.cos(d); } function sin(d) { return Math.sin(d); } function toRadians(d) { return d * Math.PI / 180; } </lxslt:script> </lxslt:component>
  • 46.
  • 47.
  • 48.
  • 49. Producer Transformation
  • 50.
  • 51.
  • 52.
  • 53.
  • 54. Discussion XSLT 2.0 - Grouping <paper> <title> XML and PDF in Publishing Workflows</title> <author> Myers, Charles </author> </paper> <paper> <title> On the Way to XML</title> <author> Parsons, Jonathan </author> <author> Caisley, Phil </author> </paper> <author> <name>Caisley, Phil</name> <paper> On the Way to XML </paper> </author> <author> <name>Myers, Charles</name> <paper> XML and PDF in Publishing Workflows </paper> </author> <author> <name> Parsons, Jonathan</name> <paper> On the Way to XML </paper> </author>
  • 55.
  • 56. <paper> <title> XML and PDF in Publishing Workflows</title> <author> Myers, Charles </author> </paper> <paper> <title> On the Way to XML</title> <author> Parsons, Jonathan </author> <author> Caisley, Phil </author> </paper> <author> <name>Caisley, Phil</name> <paper> On the Way to XML </paper> </author> <author> <name>Myers, Charles</name> <paper> XML and PDF in Publishing Workflows </paper> </author> <author> <name> Parsons, Jonathan</name> <paper> On the Way to XML </paper> </author> <xsl:for-each-group select= &quot;paper&quot; group-by= &quot;author&quot; > <xsl:sort select=&quot;current-grouping-key()&quot; /> <author> <name> <xsl:value-of select=&quot;current-grouping-key()&quot; /> </name> <xsl:for-each select=&quot;current-group()&quot;> <paper> <xsl:value-of select=&quot;title&quot; /> </paper> </xsl:for-each> </author> </xsl:for-each-group>
  • 57. Discussion XSLT 2.0 - Function Definitions
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.