You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Henning Schmiedehausen <hp...@intermeta.de> on 2003/06/26 09:50:28 UTC

Re: XSLT Service

Hi,

questions like this are best put on turbine-user@jakarta.apache.org

I'm not using the XSLT Service myself, but I'm sure that there are
people on the users list that can help you.

	Regards
		Henning


On Wed, 2003-06-25 at 19:26, Jayram, Ven wrote:
> Hi there:
> I am trying to use XSLT with velocity macros.. using TurbineXSLT service.. 
> any examples you may have would be greatly appreciated..
> 
> I have an XML document that I get in my Action class from a backend service
> that I want to render using XSL and VM. 
> 
> 
> Ven 
-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

Java, perl, Solaris, Linux, xSP Consulting, Web Services 
freelance consultant -- Jakarta Turbine Development  -- hero for hire

--- Quote of the week: "It is pointless to tell people anything when
you know that they won't process the message." --- Jonathan Revusky


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


Re: XSLT Service -- New Wiki Entry?

Posted by Alex McLintock <al...@OWAL.co.uk>.
At 13:10 26/06/03, you wrote:
>Howdy--
>
>Just curious if I should write up a quick XSLT Service howto for the
>Wiki?  What's the standard procedure for added content there?
>
>bmj


You might also like to add a page to the Cocoon wiki saying that if you want to
do an XSLT website with Apache tools there are alternatives to Cocoon :-)

http://wiki.cocoondev.org/Wiki.jsp?page=RecentChanges

Just remember to be reasonably polite - it is after all supposed to be a 
Wiki about Cocoon.

Last time I developed with Turbine there was no XSLT service - or rather it 
was broken.

Alex


Available for java/perl/C++/web development in London, UK or nearby.
Apache FOP, Cocoon, Turbine, Struts,XSL:FO, XML, Tomcat, JSP
http://www.OWAL.co.uk/


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


RE: XSLT Service -- New Wiki Entry?

Posted by Chris K Chew <ch...@fenetics.com>.
Yes, Please!

Put it inside the wiki user's guide at:

http://nagoya.apache.org/wiki/apachewiki.cgi?JakartaTurbine2UsersGuide

Thanks,

Chris

> -----Original Message-----
> From: brian janaszek [mailto:bjanaszek@collaborativefusion.com]
> Sent: Thursday, June 26, 2003 6:11 AM
> To: Turbine Users List
> Subject: Re: XSLT Service -- New Wiki Entry?
> 
> 
> Howdy--
> 
> Just curious if I should write up a quick XSLT Service howto for the
> Wiki?  What's the standard procedure for added content there?
> 
> bmj
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Re: XSLT Service -- New Wiki Entry?

Posted by brian janaszek <bj...@collaborativefusion.com>.
Howdy--

Just curious if I should write up a quick XSLT Service howto for the
Wiki?  What's the standard procedure for added content there?

bmj



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


Re: XSLT Service

Posted by Jason Baragry <Ja...@nr.no>.
Henning Schmiedehausen wrote:

> On Wed, 2003-06-25 at 19:26, Jayram, Ven wrote:
> 
>>Hi there:
>>I am trying to use XSLT with velocity macros.. using TurbineXSLT service.. 
>>any examples you may have would be greatly appreciated..
>>
>>I have an XML document that I get in my Action class from a backend service
>>that I want to render using XSL and VM. 
>>
>>

I asked a similar question recently and received the following
reply that works for me.

cheers

Jason
----

Solutions 2.
 > - Use Velocity XML templates.
 > - pull in the XML
 > - transform using XSLT on the way back to the user.


The Turbine XSLT service works well.  The documentation is a little
sparse, but here's a little code snippet from a screen class:

	  // Get your XML.  I'm using a String, but
           // but you could simply create a FileReader instead
           String xmlSchema = getXMLSchema();

           // This is just a filename.  The location for the
           // templates is defined in TurbineResources.properties
           String xslTemplate = "MyTemplate.xsl";

           // Set up a StringReader for the XML String:
           Reader reader = new StringReader(xmlSchema);

           // Send the XML and the XSL template to the transformer:
           TurbineXSLTService xslt = new TurbineXSLTService();
           xslt.init();

           String sOutput = xslt.transform(xslTemplate, reader);

           context.put("formOutput", sOutput);

I'm just writing the HTML output from the XSL transformation to a
String, and accessing it in the Velocity template via the Context.  I'm
sure there are better ways to do this, but this is working just fine
(the XSL is generating HTML forms based on the contents of the XML).

HTH
b


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