Summary


Firstly, a reminder of something we said at the beginning of the chapter, and haven't touched on since: schema processing in XSLT 2.0 is optional. Some XSLT 2.0 processors won't support schema processing at all, and even if you are using a processor that is schema-aware, you can still use it to transform source documents that have no schema into result documents that have no schema.

We started this chapter with a very quick tour of the essentials of XML Schema, describing the main concepts of element and attribute declarations and simple and complex types, and discussing the role that they play in XSLT processing.

There are two main roles for schemas in XSLT, which are strongly related . Firstly, XML Schema provides the type system for XSLT and XPath, and as such, you can define the types of variables , functions, and templates in terms of types that are either built into XML Schema, or defined as user -defined types in a specific schema.

Secondly, you can use an XML Schema to validate your source documents, your result documents, or intermediate working data. This not only checks that your data is as you expected it, which helps debugging, but also annotates the nodes in the data model, which can be used to steer the way the nodes are processed , for example by defining template rules that match particular types of node.

The mechanism that binds a stylesheet to one or more schemas is the <xsl:import-schema> declaration, and we looked in some detail at the way this works.

This concludes the introductory section of this book, where I have tried to explain all the key concepts that you need to understand in order to use the language effectively.

The next four chapters form the reference section of the book: Chapter 5, in particular, contains detailed specifications of every XSLT element, arranged alphabetically . Chapter 6 describes XSLT match patterns, Chapter 7 describes the functions available in the XSLT function library as additions to the core XPath function library, and Chapter 8 is concerned with extensibility.

The final chapters of the book then step back again from the detail, to look at how the facilities of the language can be used to construct real applications. Having reached the end of this chapter, you will probably be particularly interested in Chapter 11, which describes a sample application using schema-aware XSLT stylesheets to process genealogical data, which I chose as a good example of data that goes beyond the narrow confines of the relational rows-and- columns world view.




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