SlideShare a Scribd company logo
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

More Related Content

PPTX
Xslt attributes
PPT
PDF
Day2 xslt x_path_xquery
PPTX
Xslt mule
PPTX
Introductionto xslt
PPTX
XSL - XML STYLE SHEET
PPTX
XPath Introduction
PPT
Xslt attributes
Day2 xslt x_path_xquery
Xslt mule
Introductionto xslt
XSL - XML STYLE SHEET
XPath Introduction

What's hot (13)

PPTX
PPT
Introduction of xml and xslt
PPTX
PDF
Querring xml with xpath
PPTX
Json processing
PPTX
Extracting data from xml
PPT
PPTX
XPath
ODP
Xml processing in scala
PPT
XML and XPath details
PPTX
Xml processors
PPTX
Assignment 2
Introduction of xml and xslt
Querring xml with xpath
Json processing
Extracting data from xml
XPath
Xml processing in scala
XML and XPath details
Xml processors
Assignment 2
Ad

Similar to XSLT Overview (20)

PPT
Learning XSLT
PPT
Rendering XML Documents
PPTX
XPATH_XSLT-1.pptx
PPTX
Introduction to XSLT
PPTX
Xml transformation language
PPT
5 xsl (formatting xml documents)
PPTX
Xml data transformation
PPT
Rendering XML Document
PPT
PPTX
transforming xml using xsl and xslt
PPTX
XSLT - Extensible StyleSheet Language Transformations.pptx
PPTX
PDF
Learning Xslt A Handson Introduction To Xslt And Xpath 1st Edition Michael Ja...
PDF
26xslt
PPT
XML/XSLT
PPT
PPTX
Xml part5
PPTX
Xslt elements
PDF
The Lumber Mill Xslt For Your Templates
PDF
XML Bible
Learning XSLT
Rendering XML Documents
XPATH_XSLT-1.pptx
Introduction to XSLT
Xml transformation language
5 xsl (formatting xml documents)
Xml data transformation
Rendering XML Document
transforming xml using xsl and xslt
XSLT - Extensible StyleSheet Language Transformations.pptx
Learning Xslt A Handson Introduction To Xslt And Xpath 1st Edition Michael Ja...
26xslt
XML/XSLT
Xml part5
Xslt elements
The Lumber Mill Xslt For Your Templates
XML Bible
Ad

More from Randy Riness @ South Puget Sound Community College (20)

Recently uploaded (20)

PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
Lesson notes of climatology university.
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Cell Structure & Organelles in detailed.
PDF
Classroom Observation Tools for Teachers
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
RMMM.pdf make it easy to upload and study
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
Institutional Correction lecture only . . .
PPTX
master seminar digital applications in india
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Final Presentation General Medicine 03-08-2024.pptx
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Lesson notes of climatology university.
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
2.FourierTransform-ShortQuestionswithAnswers.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Renaissance Architecture: A Journey from Faith to Humanism
01-Introduction-to-Information-Management.pdf
Cell Structure & Organelles in detailed.
Classroom Observation Tools for Teachers
human mycosis Human fungal infections are called human mycosis..pptx
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
RMMM.pdf make it easy to upload and study
Microbial diseases, their pathogenesis and prophylaxis
Sports Quiz easy sports quiz sports quiz
Institutional Correction lecture only . . .
master seminar digital applications in india
O5-L3 Freight Transport Ops (International) V1.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx

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