Free Web Design, Development and Programming Training and Tutorial Resources


October 14, 2009

XSLT Reference Tutorial

Here is the post on XSLT Reference Tutorial, located at the New Mexico Tech Computer Center. This XSLT tutorial describes the XSLT language for transforming XML documents. Because of XSLT’s ability to change the content of an XML document, XSLT is referred to as the stylesheet for XML. This tutorial can also serve as a reference guide to XSLT and it can also be downloaded as pdf.

XSLT Reference Tutorial:

  What is XSLT?
  A brief example
  Namespaces and XSLT
  XPath reference
     - Data types in XPath
     - Node types
     - Node tests
     - Axis selection in XPath
     - XPath operators
     - XPath functions
  Overall XSLT stylesheet structure
  The root element <xsl:stylesheet>
     - <xsl:stylesheet> attributes
  Top-level elements
     - <xsl:output>: Select output options
     - <xsl:preserve-space>: Preserving white space
     - <xsl:strip-space>: Removing non-significant white space
     - <xsl:import>: Use templates from another stylesheet
     - <xsl:key>: Create an index to optimize input document access
     - <xsl:decimal-format>: Define a numeric format
  Basic template elements
     - <xsl:template>: Define a template
     - <xsl:variable>: Define a global or local variable
     - <xsl:apply-templates>: Process a node set with appropriate templates
     - <xsl:include>: Insert another stylesheet
     - <xsl:param>: Define an argument to be passed into a template
     - <xsl:with-param>: Pass an argument to a template
  Output instructions
     - <xsl:text>: Output literal text
     - <xsl:value-of>: Output the value of an expresssion
     - <xsl:element>: Output an element
     - <xsl:attribute>: Output an attribute
     - <xsl:number>: Output an element number or formatted number
  Branching elements
     - <xsl:for-each>: Iterate over a set of nodes
     - <xsl:if>: Conditional processing
     - <xsl:choose>: The multiple-case construct
     - <xsl:call-template>: Invoke another template
  Advanced elements
     - <xsl:apply-imports>: Use an overridden template
     - <xsl:attribute-set>: Define a named attribute set
     - <xsl:comment>: Output a comment
     - <xsl:copy>: Shallow copying
     - <xsl:copy-of>: Deep copying
     - <xsl:fallback>: What to do if an extension is missing
     - <xsl:message>: Write a debugging message
     - <xsl:namespace-alias>: Assign a prefix to a namespace
     - <xsl:processing-instruction>: Output a processing instruction
     - <xsl:sort>: Process nodes in a given order
  XSLT functions
     - current(): Return the current node
     - document(): Pull in content from other documents
     - format-number(): Convert a number to a string
     - generate-id(): Generate a unique identifier
     - key(): Refer to an index entry
     - system-property(): Return a system property value
  Built-in templates
  Extension elements
     - The exsl:document extension
  Using the xsltproc processor

Tags for this post>>

No Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment

You must be logged in to post a comment.