You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by FWC Stylist Hong Wong <ho...@hotmail.com> on 2001/06/13 11:27:18 UTC

XSLTService with JSPs

Hi

I know the use of JSPs is frowned upon but...

Has anyone tried using the XSLTService with JSPs with success? Any pointers 
[examples would be ideal] would be very much appreciated.

Thanks in advance, Hong.

>From: Leon Messerschmidt <le...@opticode.co.za>
>Reply-To: turbine-user@jakarta.apache.org
>To: turbine-user@jakarta.apache.org, Gary Lawrence Murphy 
><ga...@canada.com>
>Subject: Re: Conceptual leap needed: How do I jump into Xslt services?
>Date: Wed, 13 Jun 2001 08:54:37 +0200
>
>Hi Gary,
>
>The XSLTService takes XML input and transforms it with an XSL stylesheet
>placed in the directory that you specify in the TR.properties.  It only
>exposes a transform() method, which you use to do the transformation.
>
>The VelocityXslLayout assumes that your Velocity Layout/Screen/Navigations
>are XML templates instead of HTML templates.  So the
>Layout/Screen/Navigations work exactly the same as in HTML, but before the
>result is sent of to the user an XSL transformation is done on the content.
>VelocityXslLayout also assumes that you have correctly set up XSLTService.
>
>If you need to sometimes do a transformation and not on others, you need to
>tell a screen which layout to use.  You can use setLayout to make it use 
>the
>VelocityXslLayout when you need transform.  You can also implement your own
>layout class and let this class decide when to do a transform and when not.
>
>~ Leon
>
>p.s. Remember to turn on XSLT caching in your TR.properties for production,
>otherwise you're site is going to be SLLOOOOWWWWWW.
>
> >
> > The xdocs say to look at VelocityXslLayout.java for usage examples,
> > but the source file only tells how to enable the service in the 
>tr.props;
> > where can I learn how to actually invoke the service?
> >
> > What I'd want is to have my new DefaultLayout detect that the request
> > really wants an XML doc, and have it setLayout (or setLayoutTemplate?)
> > to the XML case, but what happens next?
> >
> > --
> > Gary Lawrence Murphy <ga...@teledyn.com> TeleDynamics Communications Inc
> > Business Innovations Through Open Source Systems: http://www.teledyn.com
> > "Computers are useless.  They can only give you answers."(Pablo Picasso)
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: XSLTService with JSPs

Posted by Jon Stevens <jo...@latchkey.com>.
on 6/13/01 3:13 AM, "Leon Messerschmidt" <le...@opticode.co.za> wrote:

> Hi Hong,
> 
> XSLT is also somewhat frowned upon, so I don't think anyone has tried the
> double-frown :-)

The general idea of XSLT is very good. That is what Anakia is based on. It
is the XSLT spec/implementation which sucks. :-)

-jon


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: XSLTService with JSPs

Posted by Leon Messerschmidt <le...@opticode.co.za>.
Hi Hong,

XSLT is also somewhat frowned upon, so I don't think anyone has tried the
double-frown :-)

As long as you can feed the XSLTService with XML input it will happile
transform anything you give it, regardless where it came from.  If you can
divise a way to give it XML that came from JSP it will work.

~ Leon

> Hi
>
> I know the use of JSPs is frowned upon but...
>
> Has anyone tried using the XSLTService with JSPs with success? Any
pointers
> [examples would be ideal] would be very much appreciated.
>
> Thanks in advance, Hong.
>
> >From: Leon Messerschmidt <le...@opticode.co.za>
> >Reply-To: turbine-user@jakarta.apache.org
> >To: turbine-user@jakarta.apache.org, Gary Lawrence Murphy
> ><ga...@canada.com>
> >Subject: Re: Conceptual leap needed: How do I jump into Xslt services?
> >Date: Wed, 13 Jun 2001 08:54:37 +0200
> >
> >Hi Gary,
> >
> >The XSLTService takes XML input and transforms it with an XSL stylesheet
> >placed in the directory that you specify in the TR.properties.  It only
> >exposes a transform() method, which you use to do the transformation.
> >
> >The VelocityXslLayout assumes that your Velocity
Layout/Screen/Navigations
> >are XML templates instead of HTML templates.  So the
> >Layout/Screen/Navigations work exactly the same as in HTML, but before
the
> >result is sent of to the user an XSL transformation is done on the
content.
> >VelocityXslLayout also assumes that you have correctly set up
XSLTService.
> >
> >If you need to sometimes do a transformation and not on others, you need
to
> >tell a screen which layout to use.  You can use setLayout to make it use
> >the
> >VelocityXslLayout when you need transform.  You can also implement your
own
> >layout class and let this class decide when to do a transform and when
not.
> >
> >~ Leon
> >
> >p.s. Remember to turn on XSLT caching in your TR.properties for
production,
> >otherwise you're site is going to be SLLOOOOWWWWWW.
> >
> > >
> > > The xdocs say to look at VelocityXslLayout.java for usage examples,
> > > but the source file only tells how to enable the service in the
> >tr.props;
> > > where can I learn how to actually invoke the service?
> > >
> > > What I'd want is to have my new DefaultLayout detect that the request
> > > really wants an XML doc, and have it setLayout (or setLayoutTemplate?)
> > > to the XML case, but what happens next?
> > >
> > > --
> > > Gary Lawrence Murphy <ga...@teledyn.com> TeleDynamics Communications
Inc
> > > Business Innovations Through Open Source Systems:
http://www.teledyn.com
> > > "Computers are useless.  They can only give you answers."(Pablo
Picasso)
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> > >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org