SlideShare a Scribd company logo
XSL
XML STYLE SHEET LANGUAGE
SARASWATHI RAMALINGAM
SRI AKILANDESWARI WOMENS COLLEGE
XSL
• XSL has two independent languages:
– The XSL Transformation Language (XSLT)
– The XSL Formatting Object Language
(XSL-FO)
• XSLT is used to convert an XML document
to another format.
• XSL-FO provides a way of describing the
presentation of an XML document.
book.xml
<?xml version=”1.0”?>
<book>
<author>Michael Daconta et al</author>
<title>XML Development with Java 2</title>
<category>Java</category>
<price currency=”USD”>44.99</price>
<summary>
XML Development with Java 2 provides the information
and techniques a Java developer will need to integrate
XML into Java-based applications.
</summary>
</book>
book.xml
• In this example, we will apply the style
sheet in a client-side Web browser.
• The XML document makes a reference to a
style sheet using the following code:
<?xml-stylesheet type=”text/xsl”
href=”book_view.xsl”?>
Creating the XSL Style Sheet
<?xml version=”1.0”?>
<xsl:stylesheet xmlns:xsl=”URI” version=”1.0”>
<!--XSL-T CONVERSION RULES-->
</xsl:stylesheet>
• The <xsl:stylesheet> element defines how
the XSLT processor should process the
current XSL document.
• The xmlns attribute is the namespace
definition.
• The XSL Transformation engine reads the
xmlns attribute and determines whether it
supports the given namespace.
• The xmlns attribute specifies the XSL prefix.
• All XSL elements and types in the document use the
prefix.
• The xmlns attribute value contains a Uniform Resource
Identifier (URI), which serves as a generic method for
identifying entities on the World Wide Web.
• It is important to note that the XSLT processor will not
connect to the URI; it simply compares the URI against
a collection of URIs that it supports.
• The XSL style sheet contains HTML text
and XSL elements.
• The HTML text forms the basis of the
desired output page.
• The XSL elements are template rules for the
XSLT processor.
• A template is associated with a given
element in the XML document.
• In our example, a template is defined
to match on the <book> element using
the following code:
<xsl:template match=”/book”>
<!--static text and xsl rules -->
</xsl:template>
• XSLT defines the <xsl:value-of> element for
retrieving data from a XML document.
• The <xsl:value-of> element contains a select
attribute.
• This attribute value is the name of the actual
XML element you want to retrieve.
For example
<xsl:value-of select=”title” />
book_view.xsl
<?xml version=”1.0”?>
<xsl:stylesheet xmlns:xsl=”http://www.w3.org/1999/XSL/Transform” version=”1.0”>
<xsl:template match=”/book”>
<html><body>
<b>Title: </b> <xsl:value-of select=”title” />
<p/>
<b>By: </b> <xsl:value-of select=”author” />
<p/>
<b>Cost: </b> <xsl:value-of select=”price” />
<p/>
<b>Category: </b> <xsl:value-of select=”category” />
<p/>
<b>Description</b>
<p/>
<i><xsl:value-of select=”summary” /></i>
</body></html>
</xsl:template>
</xsl:stylesheet>
Ad

More Related Content

What's hot (20)

Xml dom
Xml domXml dom
Xml dom
sana mateen
 
Dom parser
Dom parserDom parser
Dom parser
sana mateen
 
Xml
XmlXml
Xml
Sudharsan S
 
Xml processors
Xml processorsXml processors
Xml processors
Saurav Mawandia
 
Xslt
XsltXslt
Xslt
prathap kumar
 
Xslt tutorial
Xslt tutorialXslt tutorial
Xslt tutorial
Bijoy Kureekkal
 
Xml Lecture Notes
Xml Lecture NotesXml Lecture Notes
Xml Lecture Notes
Santhiya Grace
 
Introduction to XSLT
Introduction to XSLTIntroduction to XSLT
Introduction to XSLT
Mahmoud Allam
 
Xsd
XsdXsd
Xsd
prathap kumar
 
HTML and XML Difference FAQs
HTML and XML Difference FAQsHTML and XML Difference FAQs
HTML and XML Difference FAQs
Umar Ali
 
Understanding XML DOM
Understanding XML DOMUnderstanding XML DOM
Understanding XML DOM
Om Vikram Thapa
 
Introduction of xml and xslt
Introduction of xml and xsltIntroduction of xml and xslt
Introduction of xml and xslt
TUSHAR VARSHNEY
 
XSLT
XSLTXSLT
XSLT
Surinder Kaur
 
Introductionto xslt
Introductionto xsltIntroductionto xslt
Introductionto xslt
Kumar
 
XML/XSLT
XML/XSLTXML/XSLT
XML/XSLT
thinkahead.net
 
XML
XMLXML
XML
baabtra.com - No. 1 supplier of quality freshers
 
XMl
XMlXMl
XMl
baabtra.com - No. 1 supplier of quality freshers
 
XML
XMLXML
XML
behnooshashrafi
 
XML Databases
XML DatabasesXML Databases
XML Databases
Jussi Pohjolainen
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Kumar
 

Similar to XSL - XML STYLE SHEET (20)

XSLT
XSLTXSLT
XSLT
Kamal Acharya
 
eXstensible Sylesheet Language_simple.pptx
eXstensible Sylesheet Language_simple.pptxeXstensible Sylesheet Language_simple.pptx
eXstensible Sylesheet Language_simple.pptx
AkshayKumar100378
 
Xslt
XsltXslt
Xslt
Manav Prasad
 
Integrative Programming and Technology Chapter 4- Dr. J. VijiPriya
Integrative Programming and Technology Chapter 4- Dr. J. VijiPriyaIntegrative Programming and Technology Chapter 4- Dr. J. VijiPriya
Integrative Programming and Technology Chapter 4- Dr. J. VijiPriya
VijiPriya Jeyamani
 
Service Oriented Architecture - Unit II
Service Oriented Architecture - Unit IIService Oriented Architecture - Unit II
Service Oriented Architecture - Unit II
Roselin Mary S
 
Xslt
XsltXslt
Xslt
xavier john
 
Xsl xslt
Xsl  xsltXsl  xslt
Xsl xslt
Dr.Saranya K.G
 
CTDA Workshop on XSL
CTDA Workshop on XSLCTDA Workshop on XSL
CTDA Workshop on XSL
University of Connecticut Libraries
 
Xml transformation language
Xml transformation languageXml transformation language
Xml transformation language
reshmavasudev
 
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...
Allison Jai O'Dell
 
XML XSLT
XML XSLTXML XSLT
XML XSLT
Vijay Kumar Verma
 
XSL- XSLT.pdf
XSL- XSLT.pdfXSL- XSLT.pdf
XSL- XSLT.pdf
KGSCSEPSGCT
 
XPATH_XSLT-1.pptx
XPATH_XSLT-1.pptxXPATH_XSLT-1.pptx
XPATH_XSLT-1.pptx
BalasundaramSr
 
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
Suite Solutions
 
Xml data transformation
Xml data transformationXml data transformation
Xml data transformation
Raghu nath
 
26xslt
26xslt26xslt
26xslt
Adil Jafri
 
Extensible Stylesheet Language
Extensible Stylesheet LanguageExtensible Stylesheet Language
Extensible Stylesheet Language
Jussi Pohjolainen
 
Xml iet 2015
Xml iet 2015Xml iet 2015
Xml iet 2015
kiransurariya
 
Session 4
Session 4Session 4
Session 4
Lại Đức Chung
 
XSLT Overview
XSLT OverviewXSLT Overview
XSLT Overview
Randy Riness @ South Puget Sound Community College
 
Ad

More from SaraswathiRamalingam (20)

MACINTOSH
MACINTOSHMACINTOSH
MACINTOSH
SaraswathiRamalingam
 
X FILES
X FILESX FILES
X FILES
SaraswathiRamalingam
 
XML SCHEMAS
XML SCHEMASXML SCHEMAS
XML SCHEMAS
SaraswathiRamalingam
 
XML
XMLXML
XML
SaraswathiRamalingam
 
XML DTD DOCUMENT TYPE DEFINITION
XML DTD DOCUMENT TYPE DEFINITIONXML DTD DOCUMENT TYPE DEFINITION
XML DTD DOCUMENT TYPE DEFINITION
SaraswathiRamalingam
 
Georg scheutz - Charles babbage - Saraswathi Ramalingam
Georg scheutz - Charles babbage - Saraswathi RamalingamGeorg scheutz - Charles babbage - Saraswathi Ramalingam
Georg scheutz - Charles babbage - Saraswathi Ramalingam
SaraswathiRamalingam
 
Dennis ritchie - SARASWATHI RAMALINGAM
Dennis ritchie - SARASWATHI RAMALINGAMDennis ritchie - SARASWATHI RAMALINGAM
Dennis ritchie - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
Arithmetic expression INFIX TO POSTFIX CONVERTION saraswathi ramalingam
Arithmetic expression INFIX TO POSTFIX CONVERTION saraswathi ramalingamArithmetic expression INFIX TO POSTFIX CONVERTION saraswathi ramalingam
Arithmetic expression INFIX TO POSTFIX CONVERTION saraswathi ramalingam
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAMPROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAMPROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAMPROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAMPROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAMPROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAMPROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAMPROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAMPROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
LAB PROGRAMS SARASWATHI RAMALINGAM
LAB PROGRAMS SARASWATHI RAMALINGAMLAB PROGRAMS SARASWATHI RAMALINGAM
LAB PROGRAMS SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
C PROGRAMS - SARASWATHI RAMALINGAM
C PROGRAMS - SARASWATHI RAMALINGAMC PROGRAMS - SARASWATHI RAMALINGAM
C PROGRAMS - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
SIMPLE C PROGRAMS - SARASWATHI RAMALINGAM
SIMPLE C PROGRAMS - SARASWATHI RAMALINGAMSIMPLE C PROGRAMS - SARASWATHI RAMALINGAM
SIMPLE C PROGRAMS - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
Mobile Computing - SARASWATHI RAMALINGAM
Mobile Computing - SARASWATHI RAMALINGAMMobile Computing - SARASWATHI RAMALINGAM
Mobile Computing - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
Georg scheutz - Charles babbage - Saraswathi Ramalingam
Georg scheutz - Charles babbage - Saraswathi RamalingamGeorg scheutz - Charles babbage - Saraswathi Ramalingam
Georg scheutz - Charles babbage - Saraswathi Ramalingam
SaraswathiRamalingam
 
Dennis ritchie - SARASWATHI RAMALINGAM
Dennis ritchie - SARASWATHI RAMALINGAMDennis ritchie - SARASWATHI RAMALINGAM
Dennis ritchie - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
Arithmetic expression INFIX TO POSTFIX CONVERTION saraswathi ramalingam
Arithmetic expression INFIX TO POSTFIX CONVERTION saraswathi ramalingamArithmetic expression INFIX TO POSTFIX CONVERTION saraswathi ramalingam
Arithmetic expression INFIX TO POSTFIX CONVERTION saraswathi ramalingam
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAMPROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAMPROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAMPROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAMPROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAMPROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAMPROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAMPROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAMPROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
LAB PROGRAMS SARASWATHI RAMALINGAM
LAB PROGRAMS SARASWATHI RAMALINGAMLAB PROGRAMS SARASWATHI RAMALINGAM
LAB PROGRAMS SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
C PROGRAMS - SARASWATHI RAMALINGAM
C PROGRAMS - SARASWATHI RAMALINGAMC PROGRAMS - SARASWATHI RAMALINGAM
C PROGRAMS - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
SIMPLE C PROGRAMS - SARASWATHI RAMALINGAM
SIMPLE C PROGRAMS - SARASWATHI RAMALINGAMSIMPLE C PROGRAMS - SARASWATHI RAMALINGAM
SIMPLE C PROGRAMS - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
Mobile Computing - SARASWATHI RAMALINGAM
Mobile Computing - SARASWATHI RAMALINGAMMobile Computing - SARASWATHI RAMALINGAM
Mobile Computing - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
Ad

Recently uploaded (20)

Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Library Association of Ireland
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Library Association of Ireland
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 

XSL - XML STYLE SHEET

  • 1. XSL XML STYLE SHEET LANGUAGE SARASWATHI RAMALINGAM SRI AKILANDESWARI WOMENS COLLEGE
  • 2. XSL • XSL has two independent languages: – The XSL Transformation Language (XSLT) – The XSL Formatting Object Language (XSL-FO) • XSLT is used to convert an XML document to another format. • XSL-FO provides a way of describing the presentation of an XML document.
  • 3. book.xml <?xml version=”1.0”?> <book> <author>Michael Daconta et al</author> <title>XML Development with Java 2</title> <category>Java</category> <price currency=”USD”>44.99</price> <summary> XML Development with Java 2 provides the information and techniques a Java developer will need to integrate XML into Java-based applications. </summary> </book>
  • 4. book.xml • In this example, we will apply the style sheet in a client-side Web browser. • The XML document makes a reference to a style sheet using the following code: <?xml-stylesheet type=”text/xsl” href=”book_view.xsl”?>
  • 5. Creating the XSL Style Sheet <?xml version=”1.0”?> <xsl:stylesheet xmlns:xsl=”URI” version=”1.0”> <!--XSL-T CONVERSION RULES--> </xsl:stylesheet>
  • 6. • The <xsl:stylesheet> element defines how the XSLT processor should process the current XSL document. • The xmlns attribute is the namespace definition. • The XSL Transformation engine reads the xmlns attribute and determines whether it supports the given namespace.
  • 7. • The xmlns attribute specifies the XSL prefix. • All XSL elements and types in the document use the prefix. • The xmlns attribute value contains a Uniform Resource Identifier (URI), which serves as a generic method for identifying entities on the World Wide Web. • It is important to note that the XSLT processor will not connect to the URI; it simply compares the URI against a collection of URIs that it supports.
  • 8. • The XSL style sheet contains HTML text and XSL elements. • The HTML text forms the basis of the desired output page. • The XSL elements are template rules for the XSLT processor. • A template is associated with a given element in the XML document.
  • 9. • In our example, a template is defined to match on the <book> element using the following code: <xsl:template match=”/book”> <!--static text and xsl rules --> </xsl:template>
  • 10. • XSLT defines the <xsl:value-of> element for retrieving data from a XML document. • The <xsl:value-of> element contains a select attribute. • This attribute value is the name of the actual XML element you want to retrieve. For example <xsl:value-of select=”title” />
  • 11. book_view.xsl <?xml version=”1.0”?> <xsl:stylesheet xmlns:xsl=”http://www.w3.org/1999/XSL/Transform” version=”1.0”> <xsl:template match=”/book”> <html><body> <b>Title: </b> <xsl:value-of select=”title” /> <p/> <b>By: </b> <xsl:value-of select=”author” /> <p/> <b>Cost: </b> <xsl:value-of select=”price” /> <p/> <b>Category: </b> <xsl:value-of select=”category” /> <p/> <b>Description</b> <p/> <i><xsl:value-of select=”summary” /></i> </body></html> </xsl:template> </xsl:stylesheet>