cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cedric POTHIN" <cedric.pot...@inovatel.com>
Subject Re: XTTransformer
Date Tue, 02 Jan 2001 15:08:25 GMT
Ok,

In fact it is <xsl:param>. The XTTransformer
doesn't take care of HTTP parameters pass
through the request like XalanTransformer.

The transform method of XTTransform class
has params parameters which contains http
parameters ( http://x/y.xml?params=value etc..)
the parameter values can be passed through the
XT processor but actually does'nt.

public Document transform( Document document,
                                           String documentBase,
                                           Document sheet,
                                           String sheetBase,
                                           Document result,
                                           Dictionary params ) {

    Transform transformer = new XSLTransformEngine().createTransform(sheet);
    transformer.transform(document, result);
    return result;
}

For example :

for uri : http://z?y.xml?x=value

we can use the value x in the stylesheet.

<xsl:param name="x"/>

<xsl:template match="/">
 <xsl:apply-templates/>
</xsl:template>

<xsl:template match="display-variables">
 <li> x = : <xsl:value-of select="$x"/></li>
</xsl:template>

this can be done with XalanTransformer but not
whith XTTransformer, whereas the XT api accept
the <xsl:param> instruction.


hope this is clearer.






> Hello,
>
> What do you mean it doesn't take care of <xsl:parameter>?
> Can you be as specific as possible?  ( I'm asking mainly
> because I wish to write a wrapper for saxon so it too can
> be used with cocoon )
>
> -matt
>
> On Tue, Jan 02, 2001 at 02:49:47PM +0100, Cedric POTHIN wrote:
> > Hi ,
> >
> > First of all I wish Cocoon community an happy
> > new year.
> >
> > I'm using Cocoon v1.8 and I would like to use
> > the James Clark's XT transformer API. But the
> > XTTransformer class which comes with v 1.7.4
> > don't take care of xsl:parameter like XalanTransformer
> > does.
> >
> > Has anybody ever implemented this before ?
> >
> > Moreover when I use It I get an Exception :
> >
> > com.jclark.xsl.dom.TransformException: illegal character
> >
> > Does somebody know this problem.
> >
> > Thanks in advance for your response.
> >
> >
>
> ---------------------------------------------------------------------
> 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