SlideShare une entreprise Scribd logo
1  sur  12
CIS-189
   XSL stands for Extensible Stylesheet
    ◦ Stylesheets are used to manage organization and
      presentation of data
   Implemented as an XML language
    ◦ Rules of XML apply
   Made up of
    ◦ XSL-FO (Formatting Objects)
    ◦ XSLT (Transformations)
   XSL-FO focused on presentation to screen
    and paper
    ◦ Not well-supported by browsers
   XSLT emphasizes re-organization of data
    ◦ Typically used for presentation but can also be used
      for conversion of data storage format
    ◦ XSLT is a declarative language
      Similar to SQL, describe results not steps
   Cascading Style Sheets used to separate
    presentation from data
   XSLT used to change – transform – data
    ◦ Convert an XML document to XHTML
   Can use both together
XSL requires several steps
1. XML processor reads document
     ◦ Creates document tree
2.    XSL processor applies rules from stylesheet
     ◦ Rules applied to document tree
     ◦ Rules applied by using pattern matching
       Identify nodes to apply rules to
     ◦ Rules are stored as templates
   XSL works by using an Input Tree
    ◦ Input Tree comes from XML processor
   Process of changing input values is call Tree
    Transformation
   Result of transformation is the Result Tree
    ◦ Result Tree can include
      XML
      HTML (must adhere to XML rules, i.e., XHTML)
      Formatting Objects
   Extensible Stylesheet Transformations is
    method of changing (transforming) XML
    based on rules of a stylesheet
   Xpath allows manipulation of parts of XML
    document
    ◦ Not XML-based
    ◦ Provides compact references
      Useful in URI’s, attributes
    ◦ Document must exist as nodes (previously parsed)
   Templates are definitions of rules,
    organization
   Patterns define values searching for (where to
    apply templates)
   Expressions allow use of functions using
    nodes as inputs
   When referring to document attributes
    preface name with “@”
   <xsl:stylesheet> is root element
    ◦ Uses namespace to define elements, attributes valid
      in a stylesheet
   <xsl:template> defines the rules/
    transformations to apply
    ◦ Match attribute specifies pattern to apply rules to
      Functions similar to criteria
   <xsl:apply-templates> applies the rules
    defined for a particular element
    ◦ Select attribute specifies elements to apply to
   <xsl:value-of> returns the value of a
    specified node, function
    ◦ Select attribute specifies value source
   <xsl:copy> copies a node to the result tree
    without any child nodes or attributes
   <xsl:copy-of> copies a node and
    child/attribute nodes
   <xsl:output> controls the result tree
    ◦ method=“xml|html|text”
   <xsl:if> provides a boolean test to determine
    processing
   <xsl:choose> offers an IF ... THEN ... ELSE
    construct
   <xsl:for-each> allows each node in a group
    to be processed
   <xsl:sort> specifies order for a group of
    nodes
   Match can use
    ◦ node name
    ◦ current position (represented by “.”)
    ◦ relative position (for example, parent = “..”)
   Specifies where the transformation to be
    applied

Contenu connexe

Tendances (13)

XML - SAX
XML - SAXXML - SAX
XML - SAX
 
Introduction of xml and xslt
Introduction of xml and xsltIntroduction of xml and xslt
Introduction of xml and xslt
 
XPATH
XPATHXPATH
XPATH
 
Querring xml with xpath
Querring xml with xpath Querring xml with xpath
Querring xml with xpath
 
Json processing
Json processingJson processing
Json processing
 
Extracting data from xml
Extracting data from xmlExtracting data from xml
Extracting data from xml
 
Session 4
Session 4Session 4
Session 4
 
Xpath
Xpath Xpath
Xpath
 
XPath
XPathXPath
XPath
 
Xml processing in scala
Xml processing in scalaXml processing in scala
Xml processing in scala
 
XML and XPath details
XML and XPath detailsXML and XPath details
XML and XPath details
 
Xml processors
Xml processorsXml processors
Xml processors
 
Assignment 2
Assignment 2Assignment 2
Assignment 2
 

Similaire à XSLT Overview

Similaire à XSLT Overview (20)

XPATH_XSLT-1.pptx
XPATH_XSLT-1.pptxXPATH_XSLT-1.pptx
XPATH_XSLT-1.pptx
 
XSLT
XSLTXSLT
XSLT
 
Xslt
XsltXslt
Xslt
 
26xslt
26xslt26xslt
26xslt
 
Xml
XmlXml
Xml
 
eXtensible Markup Language (XML)
eXtensible Markup Language (XML)eXtensible Markup Language (XML)
eXtensible Markup Language (XML)
 
Xslt elements
Xslt elementsXslt elements
Xslt elements
 
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
 
Xslt
XsltXslt
Xslt
 
Rendering XML Documents
Rendering XML DocumentsRendering XML Documents
Rendering XML Documents
 
Xslt
XsltXslt
Xslt
 
Xslt
XsltXslt
Xslt
 
5 xsl (formatting xml documents)
5   xsl (formatting xml documents)5   xsl (formatting xml documents)
5 xsl (formatting xml documents)
 
Xml session
Xml sessionXml session
Xml session
 
XSLT presentation
XSLT presentationXSLT presentation
XSLT presentation
 
transforming xml using xsl and xslt
transforming xml using xsl and xslttransforming xml using xsl and xslt
transforming xml using xsl and xslt
 
Learning XSLT
Learning XSLTLearning XSLT
Learning XSLT
 
Xml transformation language
Xml transformation languageXml transformation language
Xml transformation language
 
Introduction to XSLT
Introduction to XSLTIntroduction to XSLT
Introduction to XSLT
 
Service Oriented Architecture - Unit II
Service Oriented Architecture - Unit IIService Oriented Architecture - Unit II
Service Oriented Architecture - Unit II
 

Plus de Randy Riness @ South Puget Sound Community College

Plus de Randy Riness @ South Puget Sound Community College (20)

Stored procedures
Stored proceduresStored procedures
Stored procedures
 
3 sql overview
3 sql overview3 sql overview
3 sql overview
 
Normalization
NormalizationNormalization
Normalization
 
CIS160 final review
CIS160 final reviewCIS160 final review
CIS160 final review
 
SQL Constraints
SQL ConstraintsSQL Constraints
SQL Constraints
 
CIS 245 Final Review
CIS 245 Final ReviewCIS 245 Final Review
CIS 245 Final Review
 
CIS145 Final Review
CIS145 Final ReviewCIS145 Final Review
CIS145 Final Review
 
Cis166 Final Review C#
Cis166 Final Review C#Cis166 Final Review C#
Cis166 Final Review C#
 
Classes and Objects
Classes and ObjectsClasses and Objects
Classes and Objects
 
CIS245 sql
CIS245 sqlCIS245 sql
CIS245 sql
 
Cis245 Midterm Review
Cis245 Midterm ReviewCis245 Midterm Review
Cis245 Midterm Review
 
CSS
CSSCSS
CSS
 
XPath
XPathXPath
XPath
 
Views
ViewsViews
Views
 
CIS282 Midterm review
CIS282 Midterm reviewCIS282 Midterm review
CIS282 Midterm review
 
Schemas 2 - Restricting Values
Schemas 2 - Restricting ValuesSchemas 2 - Restricting Values
Schemas 2 - Restricting Values
 
CIS 145 test 1 review
CIS 145 test 1 reviewCIS 145 test 1 review
CIS 145 test 1 review
 
XML schemas
XML schemasXML schemas
XML schemas
 
Document type definitions part 2
Document type definitions part 2Document type definitions part 2
Document type definitions part 2
 
Document type definitions part 1
Document type definitions part 1Document type definitions part 1
Document type definitions part 1
 

Dernier

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 

Dernier (20)

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 

XSLT Overview

  • 2. XSL stands for Extensible Stylesheet ◦ Stylesheets are used to manage organization and presentation of data  Implemented as an XML language ◦ Rules of XML apply  Made up of ◦ XSL-FO (Formatting Objects) ◦ XSLT (Transformations)
  • 3. XSL-FO focused on presentation to screen and paper ◦ Not well-supported by browsers  XSLT emphasizes re-organization of data ◦ Typically used for presentation but can also be used for conversion of data storage format ◦ XSLT is a declarative language  Similar to SQL, describe results not steps
  • 4. Cascading Style Sheets used to separate presentation from data  XSLT used to change – transform – data ◦ Convert an XML document to XHTML  Can use both together
  • 5. XSL requires several steps 1. XML processor reads document ◦ Creates document tree 2. XSL processor applies rules from stylesheet ◦ Rules applied to document tree ◦ Rules applied by using pattern matching  Identify nodes to apply rules to ◦ Rules are stored as templates
  • 6. XSL works by using an Input Tree ◦ Input Tree comes from XML processor  Process of changing input values is call Tree Transformation  Result of transformation is the Result Tree ◦ Result Tree can include  XML  HTML (must adhere to XML rules, i.e., XHTML)  Formatting Objects
  • 7. Extensible Stylesheet Transformations is method of changing (transforming) XML based on rules of a stylesheet  Xpath allows manipulation of parts of XML document ◦ Not XML-based ◦ Provides compact references  Useful in URI’s, attributes ◦ Document must exist as nodes (previously parsed)
  • 8. Templates are definitions of rules, organization  Patterns define values searching for (where to apply templates)  Expressions allow use of functions using nodes as inputs  When referring to document attributes preface name with “@”
  • 9. <xsl:stylesheet> is root element ◦ Uses namespace to define elements, attributes valid in a stylesheet  <xsl:template> defines the rules/ transformations to apply ◦ Match attribute specifies pattern to apply rules to  Functions similar to criteria  <xsl:apply-templates> applies the rules defined for a particular element ◦ Select attribute specifies elements to apply to
  • 10. <xsl:value-of> returns the value of a specified node, function ◦ Select attribute specifies value source  <xsl:copy> copies a node to the result tree without any child nodes or attributes  <xsl:copy-of> copies a node and child/attribute nodes  <xsl:output> controls the result tree ◦ method=“xml|html|text”
  • 11. <xsl:if> provides a boolean test to determine processing  <xsl:choose> offers an IF ... THEN ... ELSE construct  <xsl:for-each> allows each node in a group to be processed  <xsl:sort> specifies order for a group of nodes
  • 12. Match can use ◦ node name ◦ current position (represented by “.”) ◦ relative position (for example, parent = “..”)  Specifies where the transformation to be applied