SlideShare une entreprise Scribd logo
1  sur  11
Tushar Varshney
INTRODUCTION OF XML AND XSLT
XML stands for EXtensible Markup Language.
XML was designed to store and transport data.
XML was designed to be both human- and machine-readable.
•XSLT stands for Extensible Stylesheet Language Transformations
•XSLT is used to transform XML documents into other kinds of documents--
usually, but not necessarily, XHTML
•XSLT uses two input files:
• The XML document containing the actual data
• The XSL document containing both the “framework” in
which to insert the data, and XSLT commands to do so
example
File data.xml:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="render.xsl"?>
<message>Howdy!</message>
File render.xsl:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0”
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- one rule, to transform the input root (/) -->
<xsl:template match="/">
<html><body>
<h1><xsl:value-of select="message"/></h1>
</body></html>
</xsl:template>
</xsl:stylesheet>
6
Where XSLT can be used
With an appropriate program, such as Xerces, XSLT can be used to
read and write files
A server can use XSLT to change XML files into HTML files before
sending them to the client
A modern browser can use XSLT to change XML into HTML on the
client side
This is what we will mostly be doing in this class
Most users seldom update their browsers
If you want “everyone” to see your pages, do any XSL
processing on the server side
Otherwise, think about what best fits your situation
7
An XML Schema describes the structure of an XML document, just like a DTD.
An XML document with correct syntax is called "Well Formed".
An XML document validated against an XML Schema is both "Well Formed"
and "Valid".
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="book">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string"/>
<xs:element name="author" type="xs:string"/>
<xs:element name=“qualification“ type=“xs:string”/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<xs:element name="book">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string"/>
… …
</xs:sequence>
<xs:attribute name="isbn" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:complexType name="bookType">
<xs:sequence>
<xs:element name="title" type="nameType"/>
… …
</xs:sequence>
<xs:attribute name="isbn" type="isbnType" use="required"/>
</xs:complexType>
Declaration
Type Definition <xs:element name="book" type="bookType"/>
<book isbn="0836217462">
<title>
Being a Dog Is a Full-Time Job
</title>
……
</book>
General Problem
Several-hundred-page spec in a very technical language
Practical Limitations of expressibility
content and attribute declarations cannot depend on
attributes or element context.
Technical Problem
The notion of “type” adds an extra layer of confusing
complexity
…

Contenu connexe

Tendances (6)

Xml and xml processor
Xml and xml processorXml and xml processor
Xml and xml processor
 
Xml dom
Xml domXml dom
Xml dom
 
Dom parser
Dom parserDom parser
Dom parser
 
XML Document Object Model (DOM)
XML Document Object Model (DOM)XML Document Object Model (DOM)
XML Document Object Model (DOM)
 
Understanding XML DOM
Understanding XML DOMUnderstanding XML DOM
Understanding XML DOM
 
uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2
 

En vedette

How to Install JAVA 7 (JDK 7u79) on CentOS_RHEL 7_6_5
How to Install JAVA 7 (JDK 7u79) on CentOS_RHEL 7_6_5How to Install JAVA 7 (JDK 7u79) on CentOS_RHEL 7_6_5
How to Install JAVA 7 (JDK 7u79) on CentOS_RHEL 7_6_5
TUSHAR VARSHNEY
 
1 Learning About Oracle Service Bus
1 Learning About Oracle Service Bus1 Learning About Oracle Service Bus
1 Learning About Oracle Service Bus
TUSHAR VARSHNEY
 
Oracle 11G Database Adapter as Poller with BPEL process _ My Tech Blog
Oracle 11G Database Adapter as Poller with BPEL process _ My Tech BlogOracle 11G Database Adapter as Poller with BPEL process _ My Tech Blog
Oracle 11G Database Adapter as Poller with BPEL process _ My Tech Blog
TUSHAR VARSHNEY
 
Simplifying SOA_ Choosing Between Route, Service Callout and Publish
Simplifying SOA_ Choosing Between Route, Service Callout and PublishSimplifying SOA_ Choosing Between Route, Service Callout and Publish
Simplifying SOA_ Choosing Between Route, Service Callout and Publish
TUSHAR VARSHNEY
 
Installing the Oracle SOA Suite on Red Hat 6
Installing the Oracle SOA Suite on Red Hat 6Installing the Oracle SOA Suite on Red Hat 6
Installing the Oracle SOA Suite on Red Hat 6
TUSHAR VARSHNEY
 
OSB 12c - Database Polling using DB adapter - Oracle Fusion Middleware Blog
OSB 12c - Database Polling using DB adapter - Oracle Fusion Middleware BlogOSB 12c - Database Polling using DB adapter - Oracle Fusion Middleware Blog
OSB 12c - Database Polling using DB adapter - Oracle Fusion Middleware Blog
TUSHAR VARSHNEY
 

En vedette (18)

How to Install JAVA 7 (JDK 7u79) on CentOS_RHEL 7_6_5
How to Install JAVA 7 (JDK 7u79) on CentOS_RHEL 7_6_5How to Install JAVA 7 (JDK 7u79) on CentOS_RHEL 7_6_5
How to Install JAVA 7 (JDK 7u79) on CentOS_RHEL 7_6_5
 
1 Learning About Oracle Service Bus
1 Learning About Oracle Service Bus1 Learning About Oracle Service Bus
1 Learning About Oracle Service Bus
 
Introduction to bpel
Introduction to bpelIntroduction to bpel
Introduction to bpel
 
Using jca salesforce adapter with soa suite
Using jca salesforce adapter with soa suiteUsing jca salesforce adapter with soa suite
Using jca salesforce adapter with soa suite
 
Oracle 11G Database Adapter as Poller with BPEL process _ My Tech Blog
Oracle 11G Database Adapter as Poller with BPEL process _ My Tech BlogOracle 11G Database Adapter as Poller with BPEL process _ My Tech Blog
Oracle 11G Database Adapter as Poller with BPEL process _ My Tech Blog
 
Simplifying SOA_ Choosing Between Route, Service Callout and Publish
Simplifying SOA_ Choosing Between Route, Service Callout and PublishSimplifying SOA_ Choosing Between Route, Service Callout and Publish
Simplifying SOA_ Choosing Between Route, Service Callout and Publish
 
J developer 11g components ppt
J developer 11g components pptJ developer 11g components ppt
J developer 11g components ppt
 
Description of soa and SOAP,WSDL & UDDI
Description of soa and SOAP,WSDL & UDDIDescription of soa and SOAP,WSDL & UDDI
Description of soa and SOAP,WSDL & UDDI
 
Sfdc documentation
Sfdc documentationSfdc documentation
Sfdc documentation
 
Prerequisite to start with sfdc adapter in soa 12 c
Prerequisite to start with sfdc adapter in soa 12 cPrerequisite to start with sfdc adapter in soa 12 c
Prerequisite to start with sfdc adapter in soa 12 c
 
Installing the Oracle SOA Suite on Red Hat 6
Installing the Oracle SOA Suite on Red Hat 6Installing the Oracle SOA Suite on Red Hat 6
Installing the Oracle SOA Suite on Red Hat 6
 
Componenets of osb12c
Componenets of osb12cComponenets of osb12c
Componenets of osb12c
 
OSB 12c - Database Polling using DB adapter - Oracle Fusion Middleware Blog
OSB 12c - Database Polling using DB adapter - Oracle Fusion Middleware BlogOSB 12c - Database Polling using DB adapter - Oracle Fusion Middleware Blog
OSB 12c - Database Polling using DB adapter - Oracle Fusion Middleware Blog
 
Oracle@cloud adapter(SFDC integration with SOA Suites12c)
Oracle@cloud adapter(SFDC integration with SOA Suites12c)Oracle@cloud adapter(SFDC integration with SOA Suites12c)
Oracle@cloud adapter(SFDC integration with SOA Suites12c)
 
Oracle Enterprise Scheduler(ESS Job Scheduling)
Oracle Enterprise Scheduler(ESS Job Scheduling)Oracle Enterprise Scheduler(ESS Job Scheduling)
Oracle Enterprise Scheduler(ESS Job Scheduling)
 
Horizontal clustering configuration steps
Horizontal clustering configuration steps Horizontal clustering configuration steps
Horizontal clustering configuration steps
 
oracle service bus
oracle service busoracle service bus
oracle service bus
 
Oracle Service Bus (OSB) for the Busy IT Professonial
Oracle Service Bus (OSB) for the Busy IT Professonial Oracle Service Bus (OSB) for the Busy IT Professonial
Oracle Service Bus (OSB) for the Busy IT Professonial
 

Similaire à Introduction of xml and xslt

Xml transformation language
Xml transformation languageXml transformation language
Xml transformation language
reshmavasudev
 
eXtensible Markup Language
eXtensible Markup LanguageeXtensible Markup Language
eXtensible Markup Language
Aditya Raj
 

Similaire à Introduction of xml and xslt (20)

Xslt
XsltXslt
Xslt
 
eXtensible Markup Language (XML)
eXtensible Markup Language (XML)eXtensible Markup Language (XML)
eXtensible Markup Language (XML)
 
Xslt
XsltXslt
Xslt
 
Xslt
XsltXslt
Xslt
 
Introduction to XSLT
Introduction to XSLTIntroduction to XSLT
Introduction to XSLT
 
Xslt
XsltXslt
Xslt
 
Notes from the Library Juice Academy courses on XPath, XSLT, and XQuery: Univ...
Notes from the Library Juice Academy courses on XPath, XSLT, and XQuery: Univ...Notes from the Library Juice Academy courses on XPath, XSLT, and XQuery: Univ...
Notes from the Library Juice Academy courses on XPath, XSLT, and XQuery: Univ...
 
Xml PPT
Xml PPTXml PPT
Xml PPT
 
XML Fundamentals
XML FundamentalsXML Fundamentals
XML Fundamentals
 
CTDA Workshop on XSL
CTDA Workshop on XSLCTDA Workshop on XSL
CTDA Workshop on XSL
 
Xml transformation language
Xml transformation languageXml transformation language
Xml transformation language
 
"Getting Started with XSLT" presentation slides
"Getting Started with XSLT" presentation slides"Getting Started with XSLT" presentation slides
"Getting Started with XSLT" presentation slides
 
Service Oriented Architecture - Unit II
Service Oriented Architecture - Unit IIService Oriented Architecture - Unit II
Service Oriented Architecture - Unit II
 
XML1.pptx
XML1.pptxXML1.pptx
XML1.pptx
 
XSLT presentation
XSLT presentationXSLT presentation
XSLT presentation
 
Xml iet 2015
Xml iet 2015Xml iet 2015
Xml iet 2015
 
Web Service Workshop - 3 days
Web Service Workshop - 3 daysWeb Service Workshop - 3 days
Web Service Workshop - 3 days
 
XML/XSLT
XML/XSLTXML/XSLT
XML/XSLT
 
eXtensible Markup Language
eXtensible Markup LanguageeXtensible Markup Language
eXtensible Markup Language
 
Xml 2
Xml  2 Xml  2
Xml 2
 

Dernier

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Dernier (20)

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 

Introduction of xml and xslt

  • 2. XML stands for EXtensible Markup Language. XML was designed to store and transport data. XML was designed to be both human- and machine-readable.
  • 3.
  • 4.
  • 5. •XSLT stands for Extensible Stylesheet Language Transformations •XSLT is used to transform XML documents into other kinds of documents-- usually, but not necessarily, XHTML •XSLT uses two input files: • The XML document containing the actual data • The XSL document containing both the “framework” in which to insert the data, and XSLT commands to do so
  • 6. example File data.xml: <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="render.xsl"?> <message>Howdy!</message> File render.xsl: <?xml version="1.0"?> <xsl:stylesheet version="1.0” xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- one rule, to transform the input root (/) --> <xsl:template match="/"> <html><body> <h1><xsl:value-of select="message"/></h1> </body></html> </xsl:template> </xsl:stylesheet> 6
  • 7. Where XSLT can be used With an appropriate program, such as Xerces, XSLT can be used to read and write files A server can use XSLT to change XML files into HTML files before sending them to the client A modern browser can use XSLT to change XML into HTML on the client side This is what we will mostly be doing in this class Most users seldom update their browsers If you want “everyone” to see your pages, do any XSL processing on the server side Otherwise, think about what best fits your situation 7
  • 8. An XML Schema describes the structure of an XML document, just like a DTD. An XML document with correct syntax is called "Well Formed". An XML document validated against an XML Schema is both "Well Formed" and "Valid".
  • 9. <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="book"> <xs:complexType> <xs:sequence> <xs:element name="title" type="xs:string"/> <xs:element name="author" type="xs:string"/> <xs:element name=“qualification“ type=“xs:string”/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
  • 10. <xs:element name="book"> <xs:complexType> <xs:sequence> <xs:element name="title" type="xs:string"/> … … </xs:sequence> <xs:attribute name="isbn" type="xs:string"/> </xs:complexType> </xs:element> <xs:complexType name="bookType"> <xs:sequence> <xs:element name="title" type="nameType"/> … … </xs:sequence> <xs:attribute name="isbn" type="isbnType" use="required"/> </xs:complexType> Declaration Type Definition <xs:element name="book" type="bookType"/> <book isbn="0836217462"> <title> Being a Dog Is a Full-Time Job </title> …… </book>
  • 11. General Problem Several-hundred-page spec in a very technical language Practical Limitations of expressibility content and attribute declarations cannot depend on attributes or element context. Technical Problem The notion of “type” adds an extra layer of confusing complexity …

Notes de l'éditeur

  1. Here are examples for declaration and definition. In the first block, we declare an element named “book”, while in an instance XML document, we can fill out values. In the second block, we define a complex data type named “bookType”, and then we can declare an element,book, somewhere, based on the type.