Subject: Re: [xsl] XHTML templating (best method) From: Kris Leech <krisleech@xxxxxxxxxxxxxxx> Date: Fri, 26 Jan 2007 14:57:28 +0000 |
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
the template with the include?
You can not have an xsl:include inside a template (your second example
is a syntax error).
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.
Are there any gotcha's in my reasoning below, other than that they both require creating a temporary file which would need a random filename.
sorry I didn't understand why you needed a temporary file here, or what
you mean by the [/FILE] syntax.
The usual way of sharing common features such as head and foot amongstSomething like this?
multiple stylesheets is you put teh common features in a common
stylesheet and each of the page-specific stylesheets import teh common
core (with the import being a top level instruction, not inside a
template)
[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]
abc.com/dothis.htm abc.com/dothat.htm
David
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XHTML templating (best me, David Carlisle | Thread | Re: [xsl] XHTML templating (best me, David Carlisle |
Re: [xsl] XQuery list, Joe Fawcett | Date | Re: [xsl] XHTML templating (best me, David Carlisle |
Month |