[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XHTML templating (best method)
David Carlisle wrote:
Okay, thanks. So that will not work, not the way I have it anyway.By the way how do relative paths work in includes are they relative to I just used [FILE] to show that the first example was one file (two files merged in to one) and the second example was two seperate files. I should have pointed that out. They where not supposed to be part of the XSLT code. The usual way of sharing common features such as head and foot amongstSomething like this? [FILE] <xsl:include href="view.xsl" /> <xsl:template match="/"> <html> <body> <h2>This is the layout</h2> <xsl:template match="/view"> </body> </html> </xsl:template> [/FILE] [FILE] <xsl:template match="view"> <h3>This the view</h3> <xsl:value-of select="/a"/> <xsl:value-of select="/b"/> </xsl:template> [/FILE] In this example like the others I would need to create a temp file because view.xsl will not be the real filename of the imported stylesheet. It will be a different filename for every URL. eg. abc.com/dothis.htm abc.com/dothat.htm Both URL's use the same layout, but both have a different 'view', so <xsl:include href="view.xsl" /> needs to be replaced by <xsl:include href="dothis.xsl" /> or <xsl:include href="dothat.xsl" /> depending on which URL is requested. I hope that makes sense? David
|
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
|