You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Vadim Gritsenko <vg...@hns.com> on 2000/10/31 16:20:22 UTC

[C2] XSP for XSL

Hi all,

Please, can somebody provide any comments on this?
Or, may be there is another way to do such things?

Thanks,
Vadim

> From: Vadim Gritsenko [mailto:vgritsenko@hns.com]
> 
> Is it possible to have compiled XSLs - so it is possible to write
> <xsp:code>, <xsp:expr> in XSLT stylesheets?
> 
> This can be great replacement for XSP transformer, and this can be
> compiled (xsl source modified not too frequent) !!!
> 
> An example:
> page.xml:
>     <tag attr="data">data</tag>
> 
> page.xsl:
>     <xsl:template match="tag">
>         <xsp:code>
>             // Some Java code
>             <xsl:value-of select="."/>
>             // Some Java code
>             <xsl:value-of select="@attr"/>
>             // Some Java code
>         </xsp:code>
>         <out-tag>
>             <xsp:expr>
>                 // Some Java code
>             </xsp:expr>
>         </out-tag>
>     </xsl:template>
> 
> In sitemap we can have something like this:
> 
>     <map:match pattern="page">
>         <map:generate src="page.xml"/>
>         <map:transform type="serverpages" src="page.xsl"/>
>         <map:transform src="page-to-html.xsl"/>
>         <map:serialize/>
>     </map:match>
> 
> or this:
> 
>     <map:match pattern="page">
>         <map:generate type="my-request-to-xml"/>
>         <map:transform type="serverpages" src="page.xsl"/>
>         <map:transform src="page-to-html.xsl"/>
>         <map:serialize/>
>     </map:match>
> 
> 
> Does this sounds reasonable?
> 
> Sincerely,
> Vadim