|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: seriously trivial question about processing the ro
Hi Robert, > more than one book i've been reading has presented examples of > processing an XML document whose document element is, say, <doc>, > with: > > <xsl:template match="/"> > <xsl:apply-templates select="doc"/> > </xsl:template> > > <xsl:template match="doc"> > ....etc etc ... The pattern that I tend to use is: <xsl:template match="/"> <xsl:apply-templates select="doc" mode="html" /> </xsl:template> <xsl:template match="doc" mode="html"> ... </xsl:template> In other words, I use the template matching the root node to start processing using a particular mode. This arrangement makes it easy to combine stylesheets. As Ken said, it also specifies the document element of the documents that you expect to be working with. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ 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
|

Cart








