You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Cedric POTHIN <ce...@inovatel.com> on 2001/01/02 14:49:47 UTC

XTTransformer

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.



Re: Simple Design Issue

Posted by "Peter C. Verhage" <pe...@zeelandnet.nl>.
: In Cocoon2, you could do this with a matcher which hijacks all requests
: when the server is in maintenance mode. In cocoon1, you might be able to
: use servlet chaining if your servlet engine supports it, or you could
: probably use Tomcat's 'valves' technology, or implement it as a
: logicsheet and use it from within your XSP pages (yuck).

And what about mod_rewrite for Apache. You could easily catch everything and
redirect it to one page...

Peter


Re: Simple Design Issue

Posted by Paul Russell <pa...@luminas.co.uk>.
* Sean Pau (seanpau@yahoo.com) wrote :
> I notice when Amazon have a site down for maintenance, all its URLs
> (whichever ones you bookmarked before) will direct you to the same page for
> sitedown notice.
> How does amazon did it? How does one design to cater for it? What is the
> best practise? I can think of the following options:
> * Using a big servlet as control servlet for all the site URLs.
> * Using an "include" call within all your server pages (XSP pages) so that
> you change your server pages code to redirect to the notice page. This will
> also cater for other events other than a notice page.
> * Using a redirector that is placed before the actual web servers. Is there
> such a software/hardware? Any recommendation?
> Is there any other way? Thanks

In Cocoon2, you could do this with a matcher which hijacks all requests
when the server is in maintenance mode. In cocoon1, you might be able to
use servlet chaining if your servlet engine supports it, or you could
probably use Tomcat's 'valves' technology, or implement it as a
logicsheet and use it from within your XSP pages (yuck).


Paul.

-- 
Paul Russell                                 Email:   paul@luminas.co.uk
Technical Director                             Tel:  +44 (0)20 8553 6622
Luminas Internet Applications                  Fax:  +44 (0)870 28 47489
This is not an official statement or order.    Web:    www.luminas.co.uk

Simple Design Issue

Posted by Sean Pau <se...@yahoo.com>.
hi

I notice when Amazon have a site down for maintenance, all its URLs
(whichever ones you bookmarked before) will direct you to the same page for
sitedown notice.

How does amazon did it? How does one design to cater for it? What is the
best practise? I can think of the following options:
* Using a big servlet as control servlet for all the site URLs.
* Using an "include" call within all your server pages (XSP pages) so that
you change your server pages code to redirect to the notice page. This will
also cater for other events other than a notice page.
* Using a redirector that is placed before the actual web servers. Is there
such a software/hardware? Any recommendation?

Is there any other way? Thanks


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


Re: XTTransformer

Posted by Cedric POTHIN <ce...@inovatel.com>.
Yes, I've looked for the CVS version
of C1.8 and the XTTransformer
is minimal. I will also be interested
with your SaxonTransformer for
Cocoon. Actually, I would like to use
another Transfomer. Xalan API is not
thread safe and when I stress my
application I have performance
bottleneck and contention. I think
that's come from Xalan transformer.

I've never reach the bi-processor limit
of my Sun E450, even with 100 concurent
users.

cedric

----- Original Message -----
From: "Matthew Cordes" <mc...@maine.edu>
To: <co...@xml.apache.org>; "Cedric POTHIN"
<ce...@inovatel.com>
Sent: Tuesday, January 02, 2001 4:42 PM
Subject: Re: XTTransformer


> Cool, thanks.  Thats what I thought you meant.  Have you checked out
> the cvs version?  I'm not the maintainer, but I'll look at it more
> tonight as well ( after work :)
>
> -matt
>
> On Tue, Jan 02, 2001 at 04:08:25PM +0100, Cedric POTHIN wrote:
> > 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
> > >
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>



Re: XTTransformer

Posted by Matthew Cordes <mc...@maine.edu>.
Cool, thanks.  Thats what I thought you meant.  Have you checked out 
the cvs version?  I'm not the maintainer, but I'll look at it more 
tonight as well ( after work :)

-matt

On Tue, Jan 02, 2001 at 04:08:25PM +0100, Cedric POTHIN wrote:
> 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
> >
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 

Re: XTTransformer

Posted by Cedric POTHIN <ce...@inovatel.com>.
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
>
>



Re: XTTransformer

Posted by Matthew Cordes <mc...@maine.edu>.
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.
> 
>