Thanks guys for your input.. Here's the twist now! I got it working to call the other pattern in pipeline - get-images/*, but the generator Directory was returning an error when the dir does not exist.
After further researching and trial-error I got a better, cleaner solution. Instead of doing xinclude, document() etc etc, I just used the saxon api for Java this way: <xsl:variable name="imageExists" select="file:exists(file:new($imageFile))" xmlns:file="java.io.File"/> Then a simple <xsl:when> <xsl:otherwise> got the image url that I wanted! Hope this helps others too! Thanks again, Hiral -----Original Message----- From: Geert Josten [mailto:[EMAIL PROTECTED] Sent: Friday, February 18, 2005 4:28 PM To: [email protected] Subject: Re: XSL File I/O > My stylesheet (checkImage.xsl): > <xsl:stylesheet ...> > blah blah to get the node > <xi:include src="cocoon:/get-images{.}" > xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" /> > > My sitemap: > <map:match pattern="test.xsl"> > <map:generate src="test.xml" type="file"/> > <map:transform src="checkImage.xsl" type="xslt-saxon"/> > <map:transform type="xinclude"/> > <map:serialize type="xml"/> > </map:match> Oh, the xinclude like this will probably not work (depending on what result you actually want). I think you want to apply it on the XSL itself, not on its result. If you apply it on the XSL, you can place the xi:include inside an xsl:attribute command, otherwise not... Cheers, Geert --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
