FWIW, I concur with Luca - but you can
maybe try the XSL discussion list - see:
http://www.mulberrytech.com/xsl/xsl-list/index.html

>>> [EMAIL PROTECTED] 16/04/2002 01:34:29 >>>
Paul,

I think it's impossible: <xsl:import> must be top-level, and this puts
it (I
presume) out of the matching process.

If anyone knows something about this matter, it's time to say it aloud
!

Best regards,

---------------------------------------------
               Luca Morandini
               GIS Consultant
              [EMAIL PROTECTED] 
http://utenti.tripod.it/lmorandini/index.html 
---------------------------------------------


> -----Original Message-----
> From: Paul Pattison [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, April 16, 2002 12:13 AM
> To: Cocoon Mailing List
> Subject: dynamic <xsl:import>
>
>
> Is it possible to have the href of an <xsl:import> be dynamic?
>
> I have an xml document of data.  This document has a <layout> tag.  I
want
> to use that value to determine which file is used as the stylesheet. 
Is
> this possible?  I know my syntax is somewhat right because it works
when I
> hardcode in a value.  My source is listed below.
>
> Thanks,
>
> Paul
>
>
> Here is my xml document:
>
> <?xml version="1.0"?>
> <page>
>       <layout>another-page2html.xsl</layout>
>       <title>Simple Layout</title>
>   <content>
>       <para>This is a document using a simple layout.</para>
>   </content>
> </page>
>
>
> Here is my 'dynamic' stylesheet:
>
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>
>       <xsl:import href="{//layout}"/>
>
> </xsl:stylesheet>
>
>
> I've also tried it like this:
>
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>
>       <xsl:import>
>         <xsl:attribute name="href">
>           <xsl:value-of select="layout">
>         </xsl:attribute>
>       </xsl:import>
>
> </xsl:stylesheet>
>
>
>
---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to