Chapter 3. Creating and Using Templates

Chapter 3. Creating and Using Templates

graphics/chic01.gif

This chapter is all about creating and using templates, which are at the heart of XSLT stylesheets. Each template creates a rule that the XSLT processor tries to apply to the source document.

Chapter 2 took a look at stylesheets in overview, and introduced basic templates so that the stylesheet examples would actually do something. In this chapter, youre going to work with templates in depth, and in the next chapter youll see what kinds of expressions you can use to create match patterns in templates so that they match the nodes you want. XSLT match patterns are a subset of the full XPath language, and are complex enough to merit their own chapter.

This chapter first reviews how basic templates work, and then moves on to topics such as default template rules, selecting which template to use, handling attributes, making shallow and deep copies of elements, terminating template processing, and a great deal more.



Inside XSLT
Inside Xslt
ISBN: B0031W8M4K
EAN: N/A
Year: 2005
Pages: 196

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