cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: Processing XSL dynamically created with XSLT
Date Mon, 04 Feb 2002 20:38:35 GMT
Check out also http://localhost:8080/cocoon/sub/xsl-dynamic sample, it
might be of help (Cocoon 2.0.1)

Vadim

-----Original Message-----
From: Ruud Diterwich [mailto:rditerwich@cedron.com] 
Sent: Monday, February 04, 2002 3:43 AM
To: cocoon-users@xml.apache.org
Subject: Re: Processing XSL dynamically created with XSLT 

> Hi from a cocoon-users newbie --
>
> Is it possible to use Cocoon to generate an XSL stylesheet with an
XSLT 
> (not XSP), and reapply this dynamically generated stylesheet to the 
> source document?
>
> I'm not talking about normal stylesheet chaining; in this case, the 
> second stylesheet would be a "virtual," dynamically generated one, and

> not one residing statically in a file.


I'm trying to do a similar thing. Generating the stylesheet works, by
using xsl:element.

<xsl:template match="/">
	<xsl:element name="xsl:stylesheet">

		<xsl:attribute
name="xmlns:xsl">http://www.w3.org/1999/XSL/Transform</xsl:attribute>
		<xsl:attribute name="version">1.0</xsl:attribute>
		.

However, when I use it in the sitemap, I can't get it to be processed
automatically. Sometimes it works, sometimes it doesn't. These are the
relevant entries in my sitemap:

    <map:pipeline>
      <map:match pattern="generated_stylesheet">
        <map:generate src="stylesheet_source.xml" type="file"/>
        <map:transform src="generate_stylesheet.xsl"/>
        <map:serialize type="xml"/>
      </map:match>
    </map:pipeline>

    <map:pipeline>
      <map:match pattern="test">
        <map:generate src="source.xml" type="file"/>
        <map:transform src="cocoon:/generated_stylesheet" type="xslt"/>
        <map:serialize type="xml"/>
      </map:match>
    </map:pipeline>

Any ideas?

Ruud Diterwich


---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message