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:   
>> <mailto:[EMAIL PROTECTED]>
>> For additional commands, e-mail: 
>> <mailto:[EMAIL PROTECTED]>
>>
>>
>
>
>
>
> -- 
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
>
>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to