Re: XSLT Processing Model Questions
> First: I'm viewing the source-tree serialization given in section > D.1. This is what is leading me to believe this. The template <xsl:template match="doc/title"> <h1> <xsl:apply-templates/> </h1> </xsl:template> Matches the title element: <title>Document Title</title> and produces a <h1> element in the output, the apply-templates there matches the children of the title element, which is the text node Document Title and produces an identical text node as the child of h1. Why do you think that the apply-templates is generating siblings of h1? The next sibling is the <h2>chapter title</h2> which comes about as the apply-templates in the template for doc causes templates to be applied to the <chapter? element after the title element. There is no template supplied for chapter so the default template will be used, which applies templates to the children of that element, so then th etemplate matching <xsl:template match="chapter/title"> <h2> <xsl:apply-templates/> </h2> </xsl:template> fires and produces the h2. David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format