cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vgritse...@hns.com>
Subject RE: [C2]Using logicsheets
Date Thu, 26 Oct 2000 13:54:41 GMT
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


> -----Original Message-----
> From: Lassi Immonen [mailto:limmonen@urova.fi]
> Sent: Thursday, October 26, 2000 8:51 AM
> To: cocoon-dev@xml.apache.org
> Subject: Re: [C2]Using logicsheets
> 
> 
> > > Would it be possible to get logicsheet functionality to plain
> > > .xml files
> > > also by having logicsheet transformer?
> > > This could also take away need to put xml-logicsheet prosessing
> > > instruction in .xsp, wouldn't it?
> > >
> > > Like:
> > > <map:match pattern="page">
> > >   <map:generate src="page.xml"/>
> > >   <map:transform type="logicsheet" src="page.xsl"/>
> > 
> > Hum... if I understood well your request, we end up with a XSP
> > transformer. Someone has already expressed such a wish, but I'm not
> > sure if it's a good idea, since IMHO it inhibits compilation which is
> > not what we want. Does it make sense ?
> 
> Yes it does. I suppose I can always make transformers to get dynamic tag
> behaviour in XML, if thats really necessary, thought would be easier to
> do with logicsheet. Still trying to grasp C2 concepts and which it's
> many ways of doing things is best for our project.
> 
> Any idea of performance difference between transformer just checking
> some tags and putting dynamic stuff in place and XSP and logicsheet
> doing the same? Should XSP be faster? 
> 
> Thanks,
> 
>   Lassi

Mime
View raw message