SlideShare a Scribd company logo
Location Paths [XPath §2]                                             XPath Operators                                                                                                XSLT Functions [§12, §15]
Optional ‘/’, zero or more location steps, separated by ‘/’                                                                                                                          node-set document(object, node-set?)
                                                                      Parentheses may be used for grouping.
                                                                                                                                                                                     node-set key(string, object)
Location Steps [XPath §2.1]                                           Node-sets [XPath §3.3]                                                                                         string format-number(number, string, string ?)
Axis specifier , node test, zero or more predicates
Axis Specifiers [XPath §2.2]
                                                                      |              [expr]        /                //
                                                                                                                                               XSLT 1.0                              node-set current()
                                                                                                                                                                                     string unparsed-entity-uri(string)
                                                                      Boolea ns [XPath §3.4]
ancestor::
ancestor-or-self::
                              following-sibling::
                              namespace::
                                                                      <=, <, >=, >   =, !=         and              or                         &                                     string generate-id(node-set?)
                                                                                                                                                                                     object system-property(string)
                                                                      Numbers [XPath §3.5]                                                                                           boolean element-available(string)
attribute::
child::
                              parent::
                              preceding::                             -expr          *, div, mod   +, -                                        XPath 1.0                             boolean function-available(string)
descendant::                  preceding-sibling::
descendant-or-self::
following::
                              self::
                                                                      XPath Core Function Library                                              Quick Reference                       Node Types [XPath §5]
                                                                                                                                                                                     Root                           Processing Instruction
                                                                                                                                                                                     Element                        Comment
Node Tests [XPath §2.3]                                               Node Set Functions [XPath §4.1]                                                                                Attribute                      Text
name                          node()                                  number last()                                                                                                  Namespace
prefix:name                   text()                                  number position()
*                             comment()                               number count(node-set)                                                                                         Object Types [§11.1, XPath §1]
prefix:*                      processing-instruction()                node-set id(object)
                                                                      string local-name(node-set?)                                                                                   boolean        True or false
                              processing-
                              instruction(literal)                    string namespace-uri(node-set?)                                                                                number         Floating-point number
                                                                      string name(node-set?)
Abbreviated Syntax for Location Paths                                                                                                                                                string         UCS characters
                                                                      String Functio ns [XPath §4.2]                                                                                 node-set       Set of nodes selected by a path
(nothing)       child::                                               string string(object?)
                                                                      string concat(string, string, string*)                                                                         Result tree    XSLT only. Fragment of the result tree
@               attribute::
                                                                      boolean starts-with(string, string)                                                                            fragment
//              /descendant-or-self::node()/                          boolean contains(string, string)
.               self::node()                                          string substring-before(string, string)                                                                        Expression Context [§4, XPath §1]
                                                                      string substring-after(string, string)                                                                         Context node (a node)
..              parent::node()
                                                                      string substring(string, number, number?)                                                                      Context position (a number)
/               Node tree root                                        number string-length(string?)                                                                                  Context size (a number)
                                                                                                                                               Mulberry Technologies, Inc.
                                                                      string normalize-space(string ?)                                                                               Variable bindings in scope
Predicate [XPath §2.4]                                                string translate(string, string, string)
                                                                                                                                               17 West Jefferson Street, Suite 207
                                                                                                                                               Rockville, MD 20850 USA               Namespace declarations in scope
[expr]
                                                                                                                                                                                     Function library
Variable Reference [XPath §3.7]                                       Boolea n Functions [XPath §4.3]                                          Phone: +1 301/315-9631
                                                                      boolean boolean(object)                                                  Fax: +1 301/315-8285
$qname                                                                                                                                         info@mulberrytech.com
                                                                                                                                                                                     Built-in Template Rules [§5.8]
                                                                      boolean not(object)                                                                                            <xsl:template match="*|/">
Literal Result Elements [§7.1.1]                                      boolean true()                                                           http://www.mulberrytech.com
                                                                                                                                                                                         <xsl:apply-templates/>
Any element not in the xsl: namespace and not an extension            boolean false()                                                                                                </xsl:template>
element                                                               boolean lang(string)
                                                                                                                                                                                     <xsl:template match="*|/" mode="m">
                                                                      Number Functions [XPath §4.4]                                                                                      <xsl:apply-templates mode="m"/>
                                                                      number number(object?)                                                                                         </xsl:template>
XSLT                                                                  number sum(node-set)
http://www.w3.org/TR/xslt                                                                                                                                                            <xsl:template match="text()|@*">
                                                                      number floor(number)                                                                                               <xsl:value-of select="."/>
XPath                                                                 number ceiling(number)                                                                                         </xsl:template>
http://www.w3.org/TR/xpath                                            number round(number)
                                                                                                                                                                                     <xsl:template
XSL-List                                                                                                                                                                                 match="processing-instruction()|comment()"/>
http://www.mulberrytech.com/xsl/xsl-list/                                                                                                                                            Built-in template rule for namespaces is to do nothing




                                 © 2000 Mulberry Technologies, Inc.                            © 2000 Mulberry Technologies, Inc. (20051123)                                                                        © 2000 Mulberry Technologies, Inc.
XSLT Elements                                                     Creating Attributes [§7.1.3]                                     Sorting [§10]                                                 Key
                                                                    <xsl:attribute name="{qname}"                                    <xsl:sort select="string-expr" lang="{nmtoken}"             xsl:stylesheet
Styleshe et Element [§2.2]                                                                                                                                                                                        Element
                                                                       namespace="{uri-reference}">...</xsl:attribute>                  data-type="{text|number|qname-but-not-
  <xsl:stylesheet version="1.0" id="id"                                                                                                 ncname}" order="{ascending|descending}"                  version=         Required attribute
      extension-element-prefixes="tokens"                         Named Attribute Sets [§7.1.4]                                         case-order="{upper-first|lower-first}"/>                 version=         Optional attribute
      exclude-result-prefixes="tokens"                              <xsl:attribute-set name="qname"
      xmlns:xsl="http://www.w3.org/1999/XSL/                           use-attribute-sets="qnames">                                Variables and Parameters [§11]                                {expr}           Attribute value template. Text between
      Transform"> xsl:import*, top-level elements                      xsl:attribute* </xsl:attribute-set>                           <xsl:variable name="qname" select="expr"/>                                   any { and } is evaluated as an
  </xsl:stylesheet>                                                                                                                  <xsl:variable name="qname">...</xsl:variable>                                expression. Attribute value must
                                                                  Creating Text [§7.2]
                                                                    <xsl:text disable-output-escaping="yes|no">                      <xsl:param name="qname" select="expr"/>                                      evaluate to indicated attribute type.
  xsl:transform is a synonym for xsl:stylesheet
                                                                       #PCDATA </xsl:text>                                           <xsl:param name="qname">...</xsl:param>                     …                Anything allowed in a template
Combining Styleshe ets [§2.6]                                                                                                                                                                    |
                                                                  Processing Instructions [§7.3]                                   Using Values [§11.3]                                                           Separates alternative values
  <xsl:include href="uri-reference"/>
                                                                    <xsl:processing-instruction name="{ncname}">                     <xsl:copy-of select="expr"/>                                ?                Zero or one occurrences
  <xsl:import href="uri-reference"/>
                                                                       ...</xsl:processing-instruction>                            Passing Parameters [§11.6]                                    *                Zero or more occurrences
Whitespace Stripping [§3.4]                                       Creating Comm ents [§7.4]                                          <xsl:with-param name="expr" select="expr"/>                 +                One or more occurrences
  <xsl:strip-space elements="tokens"/>                                                                                               <xsl:with-param name="expr">...</xsl:with-
                                                                    <xsl:comment>...</xsl:comment>                                                                                               #PCDATA          Character data
  <xsl:preserve-space elements="tokens"/>                                                                                               param>
                                                                  Copying [§7.5]                                                                                                                 Attribute Value Types
Defining Template Rules [§5.3]                                      <xsl:copy use-attribute-sets="qnames">                         Keys [§12.2]
  <xsl:template match="pattern" name="qname"                           ...</xsl:copy>                                                <xsl:key name="qname" match="pattern"                       1.0            Literal value
     priority="number" mode="qname">                                                                                                    use="expr"/>                                             boolean-expr   Expression returning boolean value
     xsl:param* followed by text, literal result elements         Gen erating Text [§7.6.1]
                                                                    <xsl:value-of select="string-expr"                             Number Formatting [§12.3]                                     char           Single character
     and/or XSL elements </xsl:template>
                                                                       disable-output-escaping="yes|no"/>                            <xsl:decimal-format name="qname"                            expr           Expression
Applying Template Rules [§5.4]                                                                                                          decimal-separator="char"
  <xsl:apply-templates select="node-set-exp"                      Attribute Value Templates [§7.6.2]                                    grouping-separator="char" infinity="string"              id             XML name used as identifier
     mode="qname"/>                                                 <element attribute="{expr}"/>                                       minus-sign="char" NaN="string"                           ncname         XML name not containing a colon (:)
  <xsl:apply-templates select="node-set-exp"                      Numbering [§7.7]                                                      percent="char" per-mille="char"                          node-set-expr Expression returning a node set
     mode="qname">                                                  <xsl:number level="single|multiple|any"                             zero-digit="char" digit="char"
                                                                                                                                                                                                 number-expr    Expression returning a number
     (xsl:sort | xsl:with-param)* </xsl:apply-templates>               count="pattern" from="pattern"                                   pattern-separator="char"/>
                                                                                                                                                                                                 pattern        XSLT pattern
Overriding Template Rules [§5.6]                                       value="number-expr" format="{string}"                       Messag es [§13]
                                                                       lang="{nmtoken}"                                                                                                          prefix         Namespace prefix
  <xsl:apply-imports/>                                                                                                               <xsl:message terminate="yes|no">
                                                                       letter-value="{alphabetic|traditional}"                          ...</xsl:message>                                        qname          Namespace-qualified XML name
Named Templates [§6]                                                   grouping-separator="{char}"                                                                                                              comprising local part and optional
  <xsl:call-template name="qname"/>                                    grouping-size="{number}"/>                                  Fallback [§15]                                                               prefix
  <xsl:call-template name="qname">                                                                                                   <xsl:fallback>...</xsl:fallback>
     xsl:with-param* </xsl:call-template>
                                                                  Repetition [§8]                                                                                                                qname-but-not- Namespace-qualified name comprising
                                                                    <xsl:for-each select="node-set-expr">                          O utput [§16]                                                 ncname         local part and prefix
Namespace Alias [§7.1.1]                                               xsl:sort*, ...</xsl:for-each>                                 <xsl:output                                                 token          Meaning varies with context. See Rec.
  <xsl:namespace-alias result-                                                                                                          method="xml|html|text|qname-but-not-ncname"
     prefix="prefix|#default"
                                                                  Co nditional Processing [§9]                                          version="nmtoken" encoding="string"                      uri-reference  Reference to Universal Resource
     stylesheet-prefix="prefix|#default"/>                          <xsl:if test="boolean-expr">...</xsl:i f>                           omit-xml-declaration="yes|no"                                           Identifier
                                                                    <xsl:choose>                                                        doctype-public="string" doctype-
Creating Elements [§7.1.2]                                              <xsl:when test="expr">...</xsl:when> +                          system="string" standalone="yes|no"
  <xsl:element name="{qname}"                                           <xsl:otherwise>...</xsl:otherwise> ?                            indent="yes|no"
     namespace="{uri-reference}"                                    </xsl:choose>                                                       cdata-section-elements="qnames"
     use-attribute-sets="qnames">...</xsl:element>                                                                                      media-type="string"/>




                             © 2000 Mulberry Technologies, Inc.                               © 2000 Mulberry Technologies, Inc.                            © 2000 Mulberry Technologies, Inc.                                 © 2000 Mulberry Technologies, Inc.

More Related Content

PDF
Xsl Tand X Path Quick Reference
PDF
Learn How to Master Solr1 4
PDF
PyCon NZ 2013 - Advanced Methods For Creating Decorators
PDF
Drizzles Approach To Improving Performance Of The Server
PPTX
SQL Server Select Topics
PDF
Oop07 6
PDF
Model-Driven Software Development - Pretty-Printing, Editor Services, Term Re...
PPTX
Python 3.6 Features 20161207
Xsl Tand X Path Quick Reference
Learn How to Master Solr1 4
PyCon NZ 2013 - Advanced Methods For Creating Decorators
Drizzles Approach To Improving Performance Of The Server
SQL Server Select Topics
Oop07 6
Model-Driven Software Development - Pretty-Printing, Editor Services, Term Re...
Python 3.6 Features 20161207

What's hot (20)

KEY
Network vs. Code Metrics to Predict Defects: A Replication Study
KEY
Ruby Supercomputing - Using The GPU For Massive Performance Speedup v1.1
PDF
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)
PDF
JSTLQuick Reference
PDF
Rf介绍
DOCX
First fare 2010 java-introduction
PPT
Core java concepts
PPTX
Introduction to Haskell: 2011-04-13
PDF
AngularJS CheatSheet
PPTX
Gtc 2010 py_cula_better
PDF
front-end dev
PDF
Mobile Fest 2018. Александр Корин. Болеутоляющее
PPTX
Lecture07 the linked-list_as_a_data_structure_v3
PPT
Link list
PDF
Pragmatic Real-World Scala (short version)
PDF
PPTX
Introduction to Client-Side Javascript
PDF
The messy lecture
PPT
Dic hash
PDF
Java synchronizers
Network vs. Code Metrics to Predict Defects: A Replication Study
Ruby Supercomputing - Using The GPU For Massive Performance Speedup v1.1
Domain-Specific Languages for Composable Editor Plugins (LDTA 2009)
JSTLQuick Reference
Rf介绍
First fare 2010 java-introduction
Core java concepts
Introduction to Haskell: 2011-04-13
AngularJS CheatSheet
Gtc 2010 py_cula_better
front-end dev
Mobile Fest 2018. Александр Корин. Болеутоляющее
Lecture07 the linked-list_as_a_data_structure_v3
Link list
Pragmatic Real-World Scala (short version)
Introduction to Client-Side Javascript
The messy lecture
Dic hash
Java synchronizers
Ad

Viewers also liked (17)

PDF
PDF
Tužan kraj Cacinog Cuce
PPTX
PPTX
APARTAMENTO RISERVATTO CORRETORA GABAN 11.7853-9660 - 55*48*22
PDF
Uwindsor Alumni Magazine - Profile
PDF
Techman Systems, Thane, Industrial Valves & Tube Fittings
PPS
23º domingo toc 2016 bene pagola
DOCX
Tarea n 1 Ensayo nuevos ambientes de aprendizaje
PPTX
DOMINGO XIX TO CICLO A
DOCX
Arabic learn
PDF
007_Figuras planas y cuerpos geométricos_Perímetro
PDF
Plantillas operaciones variadas (1)
PPTX
до дня святого миколая
PDF
COLORECTAL SURGERY ENHANCED RECOVERY PROGRAMME - Draft Guidelines
PPTX
Kwestiaskali
Tužan kraj Cacinog Cuce
APARTAMENTO RISERVATTO CORRETORA GABAN 11.7853-9660 - 55*48*22
Uwindsor Alumni Magazine - Profile
Techman Systems, Thane, Industrial Valves & Tube Fittings
23º domingo toc 2016 bene pagola
Tarea n 1 Ensayo nuevos ambientes de aprendizaje
DOMINGO XIX TO CICLO A
Arabic learn
007_Figuras planas y cuerpos geométricos_Perímetro
Plantillas operaciones variadas (1)
до дня святого миколая
COLORECTAL SURGERY ENHANCED RECOVERY PROGRAMME - Draft Guidelines
Kwestiaskali
Ad

Similar to XSLT 1 and XPath Quick Reference (from mulberrytech.com) (20)

PDF
Building a SQL Database that Works
KEY
Xbase - Implementing Domain-Specific Languages for Java
PDF
Pune Clojure Course Outline
PDF
Simplifying Database Development (OSCON 2009)
PDF
RaleighFS v5
PPT
Sedna XML Database System: Internal Representation
PPTX
Plc (1)
PDF
Meta-objective Lisp @名古屋 Reject 会議
PDF
DSL - Domain Specific Languages, Chapter 4, Internal DSL
PPTX
tree-sitter-objc-slides.pptx
PDF
Efficient Parallel Set-Similarity Joins Using MapReduce - Poster
PDF
Meet scala
PDF
javascript-cheat-sheet-v1_1
PDF
javascript-cheat-sheet-v1_1
PDF
Introduction to Scala
KEY
Clojure Intro
PDF
python-cheat-sheet-v1
ODP
Getting started with Clojure
KEY
Have Your Cake and Eat It Too: Meta-Programming Techniques for Java
PDF
Ekeko Technology Showdown at SoTeSoLa 2012
Building a SQL Database that Works
Xbase - Implementing Domain-Specific Languages for Java
Pune Clojure Course Outline
Simplifying Database Development (OSCON 2009)
RaleighFS v5
Sedna XML Database System: Internal Representation
Plc (1)
Meta-objective Lisp @名古屋 Reject 会議
DSL - Domain Specific Languages, Chapter 4, Internal DSL
tree-sitter-objc-slides.pptx
Efficient Parallel Set-Similarity Joins Using MapReduce - Poster
Meet scala
javascript-cheat-sheet-v1_1
javascript-cheat-sheet-v1_1
Introduction to Scala
Clojure Intro
python-cheat-sheet-v1
Getting started with Clojure
Have Your Cake and Eat It Too: Meta-Programming Techniques for Java
Ekeko Technology Showdown at SoTeSoLa 2012

More from FrescatiStory (20)

PPS
Șomerul
PPS
Colina crucilor, Lituania
PPS
Palatul lui Gigi Becali
PPS
Le marché aux oignons à Berne, Suisse
PPS
Photos inusitées
PPS
Beautiful Greece
PPS
Crucea Caraiman (Crucea Eroilor Neamului)
PPS
A fi părinte în lumea animalelor - Parenting Moments in the Animal World
PPS
România. Lecția de istorie
PPS
Islamism
PPS
Alertă medicală - Un osuț foarte ascuțit
PPS
Oameni, destine
PPS
Large Easter eggs around the world
PPS
Patru secrete ale telefonului tău mobil
PPS
Populația mahomedană în Europa
PPS
Bucovina altui veac
PPS
Plus qu’une photo / Mai mult decât o simplă fotografie / More than just a photo
PPS
Noiembrie frumoasă
PPS
Niciodata toamna n-a fost mai frumoasa
PPS
Salina Turda
Șomerul
Colina crucilor, Lituania
Palatul lui Gigi Becali
Le marché aux oignons à Berne, Suisse
Photos inusitées
Beautiful Greece
Crucea Caraiman (Crucea Eroilor Neamului)
A fi părinte în lumea animalelor - Parenting Moments in the Animal World
România. Lecția de istorie
Islamism
Alertă medicală - Un osuț foarte ascuțit
Oameni, destine
Large Easter eggs around the world
Patru secrete ale telefonului tău mobil
Populația mahomedană în Europa
Bucovina altui veac
Plus qu’une photo / Mai mult decât o simplă fotografie / More than just a photo
Noiembrie frumoasă
Niciodata toamna n-a fost mai frumoasa
Salina Turda

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Approach and Philosophy of On baking technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Encapsulation_ Review paper, used for researhc scholars
PPT
Teaching material agriculture food technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Machine learning based COVID-19 study performance prediction
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Empathic Computing: Creating Shared Understanding
NewMind AI Weekly Chronicles - August'25 Week I
20250228 LYD VKU AI Blended-Learning.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Unlocking AI with Model Context Protocol (MCP)
Approach and Philosophy of On baking technology
Dropbox Q2 2025 Financial Results & Investor Presentation
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Review of recent advances in non-invasive hemoglobin estimation
Encapsulation_ Review paper, used for researhc scholars
Teaching material agriculture food technology
Chapter 3 Spatial Domain Image Processing.pdf
Spectroscopy.pptx food analysis technology
Machine learning based COVID-19 study performance prediction
Diabetes mellitus diagnosis method based random forest with bat algorithm

XSLT 1 and XPath Quick Reference (from mulberrytech.com)

  • 1. Location Paths [XPath §2] XPath Operators XSLT Functions [§12, §15] Optional ‘/’, zero or more location steps, separated by ‘/’ node-set document(object, node-set?) Parentheses may be used for grouping. node-set key(string, object) Location Steps [XPath §2.1] Node-sets [XPath §3.3] string format-number(number, string, string ?) Axis specifier , node test, zero or more predicates Axis Specifiers [XPath §2.2] | [expr] / // XSLT 1.0 node-set current() string unparsed-entity-uri(string) Boolea ns [XPath §3.4] ancestor:: ancestor-or-self:: following-sibling:: namespace:: <=, <, >=, > =, != and or & string generate-id(node-set?) object system-property(string) Numbers [XPath §3.5] boolean element-available(string) attribute:: child:: parent:: preceding:: -expr *, div, mod +, - XPath 1.0 boolean function-available(string) descendant:: preceding-sibling:: descendant-or-self:: following:: self:: XPath Core Function Library Quick Reference Node Types [XPath §5] Root Processing Instruction Element Comment Node Tests [XPath §2.3] Node Set Functions [XPath §4.1] Attribute Text name node() number last() Namespace prefix:name text() number position() * comment() number count(node-set) Object Types [§11.1, XPath §1] prefix:* processing-instruction() node-set id(object) string local-name(node-set?) boolean True or false processing- instruction(literal) string namespace-uri(node-set?) number Floating-point number string name(node-set?) Abbreviated Syntax for Location Paths string UCS characters String Functio ns [XPath §4.2] node-set Set of nodes selected by a path (nothing) child:: string string(object?) string concat(string, string, string*) Result tree XSLT only. Fragment of the result tree @ attribute:: boolean starts-with(string, string) fragment // /descendant-or-self::node()/ boolean contains(string, string) . self::node() string substring-before(string, string) Expression Context [§4, XPath §1] string substring-after(string, string) Context node (a node) .. parent::node() string substring(string, number, number?) Context position (a number) / Node tree root number string-length(string?) Context size (a number) Mulberry Technologies, Inc. string normalize-space(string ?) Variable bindings in scope Predicate [XPath §2.4] string translate(string, string, string) 17 West Jefferson Street, Suite 207 Rockville, MD 20850 USA Namespace declarations in scope [expr] Function library Variable Reference [XPath §3.7] Boolea n Functions [XPath §4.3] Phone: +1 301/315-9631 boolean boolean(object) Fax: +1 301/315-8285 $qname info@mulberrytech.com Built-in Template Rules [§5.8] boolean not(object) <xsl:template match="*|/"> Literal Result Elements [§7.1.1] boolean true() http://www.mulberrytech.com <xsl:apply-templates/> Any element not in the xsl: namespace and not an extension boolean false() </xsl:template> element boolean lang(string) <xsl:template match="*|/" mode="m"> Number Functions [XPath §4.4] <xsl:apply-templates mode="m"/> number number(object?) </xsl:template> XSLT number sum(node-set) http://www.w3.org/TR/xslt <xsl:template match="text()|@*"> number floor(number) <xsl:value-of select="."/> XPath number ceiling(number) </xsl:template> http://www.w3.org/TR/xpath number round(number) <xsl:template XSL-List match="processing-instruction()|comment()"/> http://www.mulberrytech.com/xsl/xsl-list/ Built-in template rule for namespaces is to do nothing © 2000 Mulberry Technologies, Inc. © 2000 Mulberry Technologies, Inc. (20051123) © 2000 Mulberry Technologies, Inc.
  • 2. XSLT Elements Creating Attributes [§7.1.3] Sorting [§10] Key <xsl:attribute name="{qname}" <xsl:sort select="string-expr" lang="{nmtoken}" xsl:stylesheet Styleshe et Element [§2.2] Element namespace="{uri-reference}">...</xsl:attribute> data-type="{text|number|qname-but-not- <xsl:stylesheet version="1.0" id="id" ncname}" order="{ascending|descending}" version= Required attribute extension-element-prefixes="tokens" Named Attribute Sets [§7.1.4] case-order="{upper-first|lower-first}"/> version= Optional attribute exclude-result-prefixes="tokens" <xsl:attribute-set name="qname" xmlns:xsl="http://www.w3.org/1999/XSL/ use-attribute-sets="qnames"> Variables and Parameters [§11] {expr} Attribute value template. Text between Transform"> xsl:import*, top-level elements xsl:attribute* </xsl:attribute-set> <xsl:variable name="qname" select="expr"/> any { and } is evaluated as an </xsl:stylesheet> <xsl:variable name="qname">...</xsl:variable> expression. Attribute value must Creating Text [§7.2] <xsl:text disable-output-escaping="yes|no"> <xsl:param name="qname" select="expr"/> evaluate to indicated attribute type. xsl:transform is a synonym for xsl:stylesheet #PCDATA </xsl:text> <xsl:param name="qname">...</xsl:param> … Anything allowed in a template Combining Styleshe ets [§2.6] | Processing Instructions [§7.3] Using Values [§11.3] Separates alternative values <xsl:include href="uri-reference"/> <xsl:processing-instruction name="{ncname}"> <xsl:copy-of select="expr"/> ? Zero or one occurrences <xsl:import href="uri-reference"/> ...</xsl:processing-instruction> Passing Parameters [§11.6] * Zero or more occurrences Whitespace Stripping [§3.4] Creating Comm ents [§7.4] <xsl:with-param name="expr" select="expr"/> + One or more occurrences <xsl:strip-space elements="tokens"/> <xsl:with-param name="expr">...</xsl:with- <xsl:comment>...</xsl:comment> #PCDATA Character data <xsl:preserve-space elements="tokens"/> param> Copying [§7.5] Attribute Value Types Defining Template Rules [§5.3] <xsl:copy use-attribute-sets="qnames"> Keys [§12.2] <xsl:template match="pattern" name="qname" ...</xsl:copy> <xsl:key name="qname" match="pattern" 1.0 Literal value priority="number" mode="qname"> use="expr"/> boolean-expr Expression returning boolean value xsl:param* followed by text, literal result elements Gen erating Text [§7.6.1] <xsl:value-of select="string-expr" Number Formatting [§12.3] char Single character and/or XSL elements </xsl:template> disable-output-escaping="yes|no"/> <xsl:decimal-format name="qname" expr Expression Applying Template Rules [§5.4] decimal-separator="char" <xsl:apply-templates select="node-set-exp" Attribute Value Templates [§7.6.2] grouping-separator="char" infinity="string" id XML name used as identifier mode="qname"/> <element attribute="{expr}"/> minus-sign="char" NaN="string" ncname XML name not containing a colon (:) <xsl:apply-templates select="node-set-exp" Numbering [§7.7] percent="char" per-mille="char" node-set-expr Expression returning a node set mode="qname"> <xsl:number level="single|multiple|any" zero-digit="char" digit="char" number-expr Expression returning a number (xsl:sort | xsl:with-param)* </xsl:apply-templates> count="pattern" from="pattern" pattern-separator="char"/> pattern XSLT pattern Overriding Template Rules [§5.6] value="number-expr" format="{string}" Messag es [§13] lang="{nmtoken}" prefix Namespace prefix <xsl:apply-imports/> <xsl:message terminate="yes|no"> letter-value="{alphabetic|traditional}" ...</xsl:message> qname Namespace-qualified XML name Named Templates [§6] grouping-separator="{char}" comprising local part and optional <xsl:call-template name="qname"/> grouping-size="{number}"/> Fallback [§15] prefix <xsl:call-template name="qname"> <xsl:fallback>...</xsl:fallback> xsl:with-param* </xsl:call-template> Repetition [§8] qname-but-not- Namespace-qualified name comprising <xsl:for-each select="node-set-expr"> O utput [§16] ncname local part and prefix Namespace Alias [§7.1.1] xsl:sort*, ...</xsl:for-each> <xsl:output token Meaning varies with context. See Rec. <xsl:namespace-alias result- method="xml|html|text|qname-but-not-ncname" prefix="prefix|#default" Co nditional Processing [§9] version="nmtoken" encoding="string" uri-reference Reference to Universal Resource stylesheet-prefix="prefix|#default"/> <xsl:if test="boolean-expr">...</xsl:i f> omit-xml-declaration="yes|no" Identifier <xsl:choose> doctype-public="string" doctype- Creating Elements [§7.1.2] <xsl:when test="expr">...</xsl:when> + system="string" standalone="yes|no" <xsl:element name="{qname}" <xsl:otherwise>...</xsl:otherwise> ? indent="yes|no" namespace="{uri-reference}" </xsl:choose> cdata-section-elements="qnames" use-attribute-sets="qnames">...</xsl:element> media-type="string"/> © 2000 Mulberry Technologies, Inc. © 2000 Mulberry Technologies, Inc. © 2000 Mulberry Technologies, Inc. © 2000 Mulberry Technologies, Inc.