Chapter 4: Stylesheets and Schemas


Highlights

One of the most important innovations in XSLT 2.0 is that stylesheets can take advantage of the schemas you have defined for your input and output documents. This chapter explores how this works.

This feature is an optional part of XSLT 2.0, in two significant ways:

  • Firstly, an XSLT 2.0 processor isn't required to implement this part of the standard. A processor that offers schema support is called a schema-aware processor; one that does not is referred to as a basic processor.

  • Secondly, even if the XSLT 2.0 processor you are using is a schema-aware processor, you can still process input documents, and produce output documents, for which there is no schema available.

There is no space in this book for a complete description of XML Schema. If you want to start writing schemas, I would recommend you read a book such as XML Schema Essentials by R. Allen Wyke and Andrew Watt (Wiley, 2002), or XML Schema by Eric van der Vlist (O'Reilly & Associates, 2002). XML Schema is a large and complicated specification, certainly as large as XSLT itself. However, it's possible that you are not writing your own schemas, but writing stylesheets designed to work with a schema that someone else has already written. If this is the case, I hope you will find the short overview of XML Schema in this chapter a useful introduction. This overview, with minor variations, is included both in this book and in XPath 2.0 Programmer's Reference, because understanding the basic concepts is essential to both languages; however, you don't need to read both.




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