You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by daniel robinson <dr...@dnai.com> on 2002/07/04 02:00:40 UTC

Action/Service/Upload/XSLT Noobie Woes

I've been at this all day, and I give up :).

What I'm trying to do:
-Generate HTML using a stylesheet and XML from a database.

Strategy:
-Use the XSLTService to perform this.
-Use doco and examples to figure out how.

Issues:
- I don't understand how to use the XSLTService within Turbine.  I've 
read the doc (not much there), looked at the examples (none for 
XSLTService), searched the listserv archives (still nothing), and posted 
a message (still not working).
- I decided to take it one step at a time and figure out how to use a 
documented and exampled service - I chose upload.
- From what I can tell the Upload example does not use the UploadService 
:(.  But defines a application level action to do this.

Assumptions:
- A service can be called directly from within a template using Velocity 
and I don't need to write an action.

What I would like:
- A clean example of an application that uses XSLTService, or
- A clean example of an application that uses some service that I can 
use to figure out how to use XSLTService, or
- Someone to spell out exactly what I need to do.

Help appreciated,

Dan




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Action/Service/Upload/XSLT Noobie Woes

Posted by Dan Robinson <dr...@dnai.com>.
Leon,

It's been some time since my original post but I'm finally getting 
around to attempting the transformation in my application.  I'm trying 
to start out simply by defining an xslt.java for my screen action:

package vstreet.turbine.myapp.modules.screens;


import java.util.Vector;
import org.apache.turbine.modules.screens.VelocityScreen;
import org.apache.turbine.util.RunData;
import org.apache.turbine.services.xslt.TurbineXSLT;
import org.apache.velocity.context.Context;
import org.apache.turbine.util.Log;
import java.io.*;

public class xslt extends VelocityScreen
{
    public void doBuildTemplate( RunData data, Context context )
    {
        String result = null;
        context.put("foo", "fool");   // use to see if we are getting 
anything at all
        try {
              TurbineXSLT xslt = new TurbineXSLT();
              Reader r = new FileReader("/xsl/index2.xml");
              result =  xslt.transform("index2.xsl",r);
              r.close();
            }
            catch (Exception e) {
              Log.error(e);
            }
         if ( result == null )
            context.put ("xml",  "mistake");
         else
            context.put ("xml",  result);
    }
}
 
I'm calling:

<p>myxml: $xml</p>
 
from the xslt.vm and I get the following error:

[Sun Jul 14 20:04:37 PDT 2002] -- ERROR -- Turbine.handleException: 
com/ibm/bsf/util/BSFEngineImpl
[Sun Jul 14 20:04:37 PDT 2002] -- ERROR --
    Exception:  java.lang.NoClassDefFoundError: 
com/ibm/bsf/util/BSFEngineImpl
    Stack Trace follows:
    java.lang.NoClassDefFoundError: com/ibm/bsf/util/BSFEngineImpl
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
    at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:106)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:243)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:51)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
    at 
org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:664)
    at 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:1077)
    at 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:976)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:115)
    at 
org.apache.xalan.xpath.ExtensionFunctionHandler.<init>(ExtensionFunctionHandler.java:110)
    at 
org.apache.xalan.xslt.ExtensionNSHandler.<init>(ExtensionNSHandler.java:104)
    at 
org.apache.xalan.xslt.StylesheetHandler.startElement(StylesheetHandler.java:606)
    at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1340)
    at 
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1122)
    at 
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1858)
    at 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1001)
    at 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
    at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:952)
    at 
org.apache.xalan.xpath.xdom.XercesLiaison.parse(XercesLiaison.java:293)
    at org.apache.xalan.xpath.dtm.DTMLiaison.parse(DTMLiaison.java:289)
    at 
org.apache.xalan.xslt.XSLTEngineImpl.processStylesheet(XSLTEngineImpl.java:784)
    at 
org.apache.turbine.services.xslt.TurbineXSLTService.compileStylesheetRoot(TurbineXSLTService.java:179)
    at 
org.apache.turbine.services.xslt.TurbineXSLTService.getStylesheetRoot(TurbineXSLTService.java:208)
    at 
org.apache.turbine.services.xslt.TurbineXSLTService.transform(TurbineXSLTService.java:222)
    at 
org.apache.turbine.services.xslt.TurbineXSLTService.transform(TurbineXSLTService.java:261)
    at 
org.apache.turbine.services.xslt.TurbineXSLTService.transform(TurbineXSLTService.java:270)
    at 
org.apache.turbine.services.xslt.TurbineXSLT.transform(TurbineXSLT.java:92)
    at 
vstreet.turbine.myapp.modules.screens.xslt.doBuildTemplate(xslt.java:36)
    at 
org.apache.turbine.modules.screens.VelocityScreen.doBuildTemplate(VelocityScreen.java:111)
    at 
org.apache.turbine.modules.screens.TemplateScreen.doBuild(TemplateScreen.java:129)
    at org.apache.turbine.modules.Screen.build(Screen.java:99)
    at org.apache.turbine.modules.ScreenLoader.eval(ScreenLoader.java:129)
    at 
org.apache.turbine.modules.layouts.VelocityECSLayout.doBuild(VelocityECSLayout.java:100)
    at org.apache.turbine.modules.Layout.build(Layout.java:91)
    at org.apache.turbine.modules.LayoutLoader.exec(LayoutLoader.java:123)
    at 
org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:166)
    at org.apache.turbine.modules.Page.build(Page.java:90)
    at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
    at org.apache.turbine.Turbine.doGet(Turbine.java:447)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:255)
    at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:225)
    at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2252)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
    at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446)
    at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
    at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:875)
    at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:952)
    at java.lang.Thread.run(Thread.java:479)


Thank,

Dan

Leon Messerschmidt wrote:

> Hi Dan,
>
> I created the original XSLTService, but I haven't been actively 
> involved for some time - this might change soon <hold item="thumb"/>  
> :-)   AFAK nothing should break the XSLTService, but if it broke I 
> will be willing to fix it.
>
> I will describe the XSLTService that I know for Turbine 2.x  - I 
> haven't looked at Turbie 3 yet.
>
> The first thing that you should do is to enter the XSLTService in your 
> TR.properties.  There are only 2 properties - the first one is the 
> path (relative to your webapp) where your XSL files will be stored and 
> the second turns XSLT caching on/off.  e.g.
>
> services.XSLTService.classname=org.apache.turbine.services.xslt.TurbineXSLTService 
>
> services.XSLTService.path=/WEB-INF/stylesheets
> services.XSLTService.cache=false
>
> Once you have done this you can use the XSLTService in your 
> source-code (it can be a screen, action or somewhere else).
>
> TurbineXSLT.transform ("mytransform.xsl", reader, writer);
>
> The first parameter is the name of your stylesheet (the file should 
> exist in the directory given in your TR.properties).  If this 
> stylesheet does not exist the service will attempt to load "default.xsl".
>
> The second parameter is a reader for the input XML and the third 
> parameter is a writer that will hold the result of the transformation.
>
> Hope this helps.  If it appears to be broken, please let me know and I 
> will fix it.
>
> ~ Leon
>
> daniel robinson wrote:
>
>> I've been at this all day, and I give up :).
>>
>> What I'm trying to do:
>> -Generate HTML using a stylesheet and XML from a database.
>>
>> Strategy:
>> -Use the XSLTService to perform this.
>> -Use doco and examples to figure out how.
>>
>> Issues:
>> - I don't understand how to use the XSLTService within Turbine.  I've 
>> read the doc (not much there), looked at the examples (none for 
>> XSLTService), searched the listserv archives (still nothing), and 
>> posted a message (still not working).
>> - I decided to take it one step at a time and figure out how to use a 
>> documented and exampled service - I chose upload.
>> - From what I can tell the Upload example does not use the 
>> UploadService :(.  But defines a application level action to do this.
>>
>> Assumptions:
>> - A service can be called directly from within a template using 
>> Velocity and I don't need to write an action.
>>
>> What I would like:
>> - A clean example of an application that uses XSLTService, or
>> - A clean example of an application that uses some service that I can 
>> use to figure out how to use XSLTService, or
>> - Someone to spell out exactly what I need to do.
>>
>> Help appreciated,
>>
>> Dan
>>
>>
>>
>>
>> -- 
>> To unsubscribe, e-mail:   
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail: 
>> <ma...@jakarta.apache.org>
>>
>>
>
>
>
>
> -- 
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
>
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Action/Service/Upload/XSLT Noobie Woes

Posted by daniel robinson <dr...@dnai.com>.
Leon,

Thanks very much for responding.  Your offer of assistance with any 
issues in XSLTService is appreciated.  Hopefully one day I'll get to the 
point where I will actually call the XSLTService :).

In your example you have:

TurbineXSLT.transform ("mytransform.xsl", reader, writer);

This is getting called from an Action?  I assumed when I started all 
this that I could call it directly from a screen using Velocity?  What 
would that look like?

Thanks,

Dan

Leon Messerschmidt wrote:

> Hi Dan,
>
> I created the original XSLTService, but I haven't been actively 
> involved for some time - this might change soon <hold item="thumb"/>  
> :-)   AFAK nothing should break the XSLTService, but if it broke I 
> will be willing to fix it.
>
> I will describe the XSLTService that I know for Turbine 2.x  - I 
> haven't looked at Turbie 3 yet.
>
> The first thing that you should do is to enter the XSLTService in your 
> TR.properties.  There are only 2 properties - the first one is the 
> path (relative to your webapp) where your XSL files will be stored and 
> the second turns XSLT caching on/off.  e.g.
>
> services.XSLTService.classname=org.apache.turbine.services.xslt.TurbineXSLTService 
>
> services.XSLTService.path=/WEB-INF/stylesheets
> services.XSLTService.cache=false
>
> Once you have done this you can use the XSLTService in your 
> source-code (it can be a screen, action or somewhere else).
>
> TurbineXSLT.transform ("mytransform.xsl", reader, writer);
>
> The first parameter is the name of your stylesheet (the file should 
> exist in the directory given in your TR.properties).  If this 
> stylesheet does not exist the service will attempt to load "default.xsl".
>
> The second parameter is a reader for the input XML and the third 
> parameter is a writer that will hold the result of the transformation.
>
> Hope this helps.  If it appears to be broken, please let me know and I 
> will fix it.
>
> ~ Leon
>
> daniel robinson wrote:
>
>> I've been at this all day, and I give up :).
>>
>> What I'm trying to do:
>> -Generate HTML using a stylesheet and XML from a database.
>>
>> Strategy:
>> -Use the XSLTService to perform this.
>> -Use doco and examples to figure out how.
>>
>> Issues:
>> - I don't understand how to use the XSLTService within Turbine.  I've 
>> read the doc (not much there), looked at the examples (none for 
>> XSLTService), searched the listserv archives (still nothing), and 
>> posted a message (still not working).
>> - I decided to take it one step at a time and figure out how to use a 
>> documented and exampled service - I chose upload.
>> - From what I can tell the Upload example does not use the 
>> UploadService :(.  But defines a application level action to do this.
>>
>> Assumptions:
>> - A service can be called directly from within a template using 
>> Velocity and I don't need to write an action.
>>
>> What I would like:
>> - A clean example of an application that uses XSLTService, or
>> - A clean example of an application that uses some service that I can 
>> use to figure out how to use XSLTService, or
>> - Someone to spell out exactly what I need to do.
>>
>> Help appreciated,
>>
>> Dan
>>
>>
>>
>>
>> -- 
>> To unsubscribe, e-mail:   
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail: 
>> <ma...@jakarta.apache.org>
>>
>>
>
>
>
>
> -- 
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
>
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Action/Service/Upload/XSLT Noobie Woes

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

I created the original XSLTService, but I haven't been actively involved 
for some time - this might change soon <hold item="thumb"/>  :-)   AFAK 
nothing should break the XSLTService, but if it broke I will be willing 
to fix it.

I will describe the XSLTService that I know for Turbine 2.x  - I haven't 
looked at Turbie 3 yet.

The first thing that you should do is to enter the XSLTService in your 
TR.properties.  There are only 2 properties - the first one is the path 
(relative to your webapp) where your XSL files will be stored and the 
second turns XSLT caching on/off.  e.g.

services.XSLTService.classname=org.apache.turbine.services.xslt.TurbineXSLTService
services.XSLTService.path=/WEB-INF/stylesheets
services.XSLTService.cache=false

Once you have done this you can use the XSLTService in your source-code 
(it can be a screen, action or somewhere else).

TurbineXSLT.transform ("mytransform.xsl", reader, writer);

The first parameter is the name of your stylesheet (the file should 
exist in the directory given in your TR.properties).  If this stylesheet 
does not exist the service will attempt to load "default.xsl".

The second parameter is a reader for the input XML and the third 
parameter is a writer that will hold the result of the transformation.

Hope this helps.  If it appears to be broken, please let me know and I 
will fix it.

~ Leon

daniel robinson wrote:
> I've been at this all day, and I give up :).
> 
> What I'm trying to do:
> -Generate HTML using a stylesheet and XML from a database.
> 
> Strategy:
> -Use the XSLTService to perform this.
> -Use doco and examples to figure out how.
> 
> Issues:
> - I don't understand how to use the XSLTService within Turbine.  I've 
> read the doc (not much there), looked at the examples (none for 
> XSLTService), searched the listserv archives (still nothing), and posted 
> a message (still not working).
> - I decided to take it one step at a time and figure out how to use a 
> documented and exampled service - I chose upload.
> - From what I can tell the Upload example does not use the UploadService 
> :(.  But defines a application level action to do this.
> 
> Assumptions:
> - A service can be called directly from within a template using Velocity 
> and I don't need to write an action.
> 
> What I would like:
> - A clean example of an application that uses XSLTService, or
> - A clean example of an application that uses some service that I can 
> use to figure out how to use XSLTService, or
> - Someone to spell out exactly what I need to do.
> 
> Help appreciated,
> 
> Dan
> 
> 
> 
> 
> -- 
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 
> 




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Action/Service/Upload/XSLT Noobie Woes

Posted by daniel robinson <dr...@dnai.com>.
Jeff,

Thanks, this is very helpful in that it gives me more of an idea how the 
whle thing fits together.  As I stated in a response to another post - 
I'm still a littly foggy on why I need to create a tool or indeed any 
java code at all to call a service, but I'll believe you :)..

One question - in your example you are calling:

xsltTool.getProductDescriptionHTML($productID)

Right now my xsl templates create fully formed HTML that would not work as an HTML code fragment.  This begs the question of exactly where exactly would I be calling this tool from?  I think that part of the problem is that the example apps use the push model and I don't understand how this maps to the layout/navigation/screen model.  In other words if I called it from Myxslscreen.vm (being referenced by a layout) I wouldn't get a well formed HTML page  (assuming that I use my existing xsl templates).  

Perhaps a reasonable approach would be to create Myxslscreen.vm that only contained:

xsltTool.getProductDescriptionHTML(123456) 

and create a layout called Myxslscreen.vm that only contained:

$screen_placeholder

I don't know, I'm just guessing at this point, any additional help would be greatly appreciated.

Thanks,

Dan



Jeff Linwood wrote:

>Hi,
>
>To use a service from a Velocity template, create a tool to access the
>service indirectly. Depending on how your application is set up, you'd
>probably want to do all of the XSLT transformation inside the tool, and not
>expose it to velocity.
>
>To set up the XSLT Service, change this property in your
>TurbineResources.properties (in WEB-INF/conf of your generated app)
>services.XSLTService.path = /path/to/stylesheets
>
>to
>
>services.XSLTService.path = /xslt
>
>or whatever.
>
>Use the pull model HOWTO to help you add a tool to Turbine. I'd configure
>the tool as global scope, but this really depends on your application.
>
>The tool can access your database to pick up XML for a product or what have
>you. For instance, if you stored a piece of XML as a description of a
>product, you could write a method in your tool with a signature like
>getProductDescriptionHTML(String productID).  This method would call another
>method which got the XML out of your database and returned it as a String.
>Use a StringReader to get your XML ready for the XSLTService.
>
>Inside the tool, use the static XSLTService helper utility class
>org.apache.turbine.services.xslt.TurbineXSLT to call the transform methods
>on the service. Call the transform method on the service, which returns a
>String. Use the filename of your XSLT style sheet for the xslName parameter.
>
>>>From inside your Velocity template, call
>$xsltTool.getProductDescriptionHTML($productID), which will return HTML.
>
>Jeff
>----- Original Message -----
>From: "daniel robinson" <dr...@dnai.com>
>To: <tu...@jakarta.apache.org>
>Sent: Wednesday, July 03, 2002 7:00 PM
>Subject: Action/Service/Upload/XSLT Noobie Woes
>
>
>>I've been at this all day, and I give up :).
>>
>>What I'm trying to do:
>>-Generate HTML using a stylesheet and XML from a database.
>>
>>Strategy:
>>-Use the XSLTService to perform this.
>>-Use doco and examples to figure out how.
>>
>>Issues:
>>- I don't understand how to use the XSLTService within Turbine.  I've
>>read the doc (not much there), looked at the examples (none for
>>XSLTService), searched the listserv archives (still nothing), and posted
>>a message (still not working).
>>- I decided to take it one step at a time and figure out how to use a
>>documented and exampled service - I chose upload.
>>- From what I can tell the Upload example does not use the UploadService
>>:(.  But defines a application level action to do this.
>>
>>Assumptions:
>>- A service can be called directly from within a template using Velocity
>>and I don't need to write an action.
>>
>>What I would like:
>>- A clean example of an application that uses XSLTService, or
>>- A clean example of an application that uses some service that I can
>>use to figure out how to use XSLTService, or
>>- Someone to spell out exactly what I need to do.
>>
>>Help appreciated,
>>
>>Dan
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:
>>
><ma...@jakarta.apache.org>
>
>>For additional commands, e-mail:
>>
><ma...@jakarta.apache.org>
>
>>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Action/Service/Upload/XSLT Noobie Woes

Posted by Jeff Linwood <je...@greenninja.com>.
Hi,

To use a service from a Velocity template, create a tool to access the
service indirectly. Depending on how your application is set up, you'd
probably want to do all of the XSLT transformation inside the tool, and not
expose it to velocity.

To set up the XSLT Service, change this property in your
TurbineResources.properties (in WEB-INF/conf of your generated app)
services.XSLTService.path = /path/to/stylesheets

to

services.XSLTService.path = /xslt

or whatever.

Use the pull model HOWTO to help you add a tool to Turbine. I'd configure
the tool as global scope, but this really depends on your application.

The tool can access your database to pick up XML for a product or what have
you. For instance, if you stored a piece of XML as a description of a
product, you could write a method in your tool with a signature like
getProductDescriptionHTML(String productID).  This method would call another
method which got the XML out of your database and returned it as a String.
Use a StringReader to get your XML ready for the XSLTService.

Inside the tool, use the static XSLTService helper utility class
org.apache.turbine.services.xslt.TurbineXSLT to call the transform methods
on the service. Call the transform method on the service, which returns a
String. Use the filename of your XSLT style sheet for the xslName parameter.

>From inside your Velocity template, call
$xsltTool.getProductDescriptionHTML($productID), which will return HTML.

Jeff
----- Original Message -----
From: "daniel robinson" <dr...@dnai.com>
To: <tu...@jakarta.apache.org>
Sent: Wednesday, July 03, 2002 7:00 PM
Subject: Action/Service/Upload/XSLT Noobie Woes


> I've been at this all day, and I give up :).
>
> What I'm trying to do:
> -Generate HTML using a stylesheet and XML from a database.
>
> Strategy:
> -Use the XSLTService to perform this.
> -Use doco and examples to figure out how.
>
> Issues:
> - I don't understand how to use the XSLTService within Turbine.  I've
> read the doc (not much there), looked at the examples (none for
> XSLTService), searched the listserv archives (still nothing), and posted
> a message (still not working).
> - I decided to take it one step at a time and figure out how to use a
> documented and exampled service - I chose upload.
> - From what I can tell the Upload example does not use the UploadService
> :(.  But defines a application level action to do this.
>
> Assumptions:
> - A service can be called directly from within a template using Velocity
> and I don't need to write an action.
>
> What I would like:
> - A clean example of an application that uses XSLTService, or
> - A clean example of an application that uses some service that I can
> use to figure out how to use XSLTService, or
> - Someone to spell out exactly what I need to do.
>
> Help appreciated,
>
> Dan
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>