Summary


The purpose of this chapter was to study the overall structure of a stylesheet, before going into the detailed specification of each element in the next chapter. We've now covered the following:

  • How a stylesheet program can be made up of one or more stylesheet modules, linked together with <xsl:import> and <xsl:include> declarations. I described how the concept of import precedence allows one stylesheet to override definitions in those it imports.

  • The <xsl:stylesheet> (or <xsl:transform> ) element, which is the outermost element of most stylesheet modules.

  • The <?xml-stylesheet?> processing instruction, which can be used to link from a source document to its associated stylesheets, and which allows a stylesheet to be embedded directly in the source document whose style it defines.

  • The declarations found in the stylesheet, that is, the immediate children of the <xsl:stylesheet> or <xsl:transform> element, including the ability to have user -defined or vendor-defined elements here.

  • How the <xsl:stylesheet> and <xsl:template match="/"> elements can be omitted to make an XSLT stylesheet look more like the simple template languages that some users may be familiar with.

  • The idea of a sequence constructor, a structure that occurs throughout a stylesheet, which is a sequence containing text nodes and literal result elements to be copied to the result tree, and instructions and extension elements to be executed. This led naturally to a discussion of literal result elements, and of attribute value templates, which are used to define variable attributes not only of literal result elements, but of certain XSLT elements as well.

  • How the W3C standards committee has tried to ensure that the specification can be extended, both by vendors and by W3C itself, without adversely affecting the portability of stylesheets. You saw how to make a stylesheet work even if it uses proprietary extension functions and extension elements that may not be available in all implementations .

  • How XSLT stylesheets handle whitespace in the source document, in the stylesheet itself, and in the result tree.

The next chapter describes how to use XSLT stylesheets together with an XML Schema for the source and/or result documents. If you are not interested in using schemas, you can probably skip that chapter and move straight to Chapter 5, which starts the main reference section of the book with an alphabetically organized set of specifications for each of the XSLT elements that can appear in a stylesheet.




XSLT 2.0 Programmer's Reference
NetBeansв„ў IDE Field Guide: Developing Desktop, Web, Enterprise, and Mobile Applications (2nd Edition)
ISBN: 764569090
EAN: 2147483647
Year: 2003
Pages: 324

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net