On 17/06/2005, at 22:24, Tod Harter wrote:

Well, it IS possible to do recursive application of templates, basically you just have to use document() to suck in the node set you want, and then call <xsl:apply-templates/> on it.

Something like:

<xsl:template match='include'>
<xsl:variable name='newdoc' select='common:node-set(document (@docurl))'/>
   <xsl:apply-templates select='$newdoc'/>
</xsl:template>

should basically do the trick. I think IIRC you will need to use the exslt node-set function. Perhaps I'm misremembering though when the variable is built using document()... Anyway I'm sure you can work it out.

Thanks for that. The example I have below does the same thing. The reason you need node-set is if you want to inject (as above) from a variable. But either way both is good.

What I realised afterwards is that I want the recursion to run via Apache.

This can be done with XSP using Util (<util:include-uri href="/blah/"/ >) however I am having trouble making this work at the moment, but it does in theory work :-) Nice thing about the above too is that XSP is standard.

Thanks for helping.

Scott
--
* - *  http://www.osdc.com.au - Open Source Developers Conference * - *
Scott Penrose
VP in charge of Pancakes
http://linux.dd.com.au/
[EMAIL PROTECTED]

Dismaimer: If you receive this email in error - please eat it immediately to prevent it from falling into the wrong hands.

Please do not send me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

Microsoft is not the answer. It's the question. And the answer is no.


Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to