You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Marius Oancea <ma...@yahoo.ca> on 2004/06/30 16:00:47 UTC
XSLTTransformer with a different source
Hi,
I have a web application that partly uses cocoon.
[ANOTHER APP]
I have a xslt that is applied during a pipe.
Now, in a servlet i have the XSLT extracted from a database.
I put this bytearray into request.
[COCOON]
I can create a custom transformer that read the bean from request
(my XSLT) but how to create a Source object out of it?
I tried to extend TraxTransformer to do the job but I cannot
succesfully create a excalibur source out of a DOM representing the
XSLT. (I can create SAXSource, DOMSource, InputStream or anything else).
My approach is wrong ?
Any other proposal ?
Best Regards
Marius
--
"Giving up smoking is the easiest thing in the world. I know because I've done it thousands of times."
Mark Twain (11/30/1835 - 04/21/1910)
My PGP Key is available at http://pgp.dtype.org:11371/pks/lookup?op=get&search=0x6FC4BCDE
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: XSLTTransformer with a different source
Posted by Marius Oancea <ma...@yahoo.ca>.
Marius Oancea wrote:
> Hi,
> I have a web application that partly uses cocoon.
> [ANOTHER APP] I have a xslt that is applied during a pipe.
>
> Now, in a servlet i have the XSLT extracted from a database.
>
> I put this bytearray into request.
> [COCOON]
> I can create a custom transformer that read the bean from request
> (my XSLT) but how to create a Source object out of it?
>
> I tried to extend TraxTransformer to do the job but I cannot
> succesfully create a excalibur source out of a DOM representing the
> XSLT. (I can create SAXSource, DOMSource, InputStream or anything else).
>
> My approach is wrong ?
>
> Any other proposal ?
>
> Best Regards
> Marius
>
>
A solution can be that the application is saving the xslt in a place,
and coocon use the default tranformer to apply the transformation ....
but I don't like.
Any other solution ?
--
"Giving up smoking is the easiest thing in the world. I know because I've done it thousands of times."
Mark Twain (11/30/1835 - 04/21/1910)
My PGP Key is available at http://pgp.dtype.org:11371/pks/lookup?op=get&search=0x6FC4BCDE
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: XSLTTransformer with a different source
Posted by Marius Oancea <ma...@yahoo.ca>.
Thanx a lot. XModuleSource save my life.
To document a bit I did the following things:
I added XModuleSource, XModuleSourceFactory and jxpath.DOMFactory and
added to my project (beacuse i had a cocoon instalation that was not
providing that (cocoon 2.1.1)
The I adjusted sitemap.xmap :
<map:transform src="context://stylesheets/tm_fo.xsl"/>
into
<map:transform src="xmodule:request-attr:dom_xslt"/>
And you have to let coocoon know about the meening of xmodule syntax:
modified cocoon.xconf:
I added <component-instance
class="cocoon.transformer.XModuleSourceFactory" name="xmodule"/>
Then i added the Node element representing the xslt on request at key
"dom_xslt" and that is all.
Cheers
M.
Joerg Heinicke wrote:
> On 30.06.2004 16:00, Marius Oancea wrote:
>
>> Hi,
>> I have a web application that partly uses cocoon.
>> [ANOTHER APP] I have a xslt that is applied during a pipe.
>>
>> Now, in a servlet i have the XSLT extracted from a database.
>>
>> I put this bytearray into request.
>> [COCOON]
>> I can create a custom transformer that read the bean from request
>> (my XSLT) but how to create a Source object out of it?
>>
>> I tried to extend TraxTransformer to do the job but I cannot
>> succesfully create a excalibur source out of a DOM representing the
>> XSLT. (I can create SAXSource, DOMSource, InputStream or anything else).
>>
>> My approach is wrong ?
>>
>> Any other proposal ?
>
>
> What about http://wiki.cocoondev.org/Wiki.jsp?page=XModuleSource?
>
> Another approach is a source that reads the stylesheet code from
> database and parses it.
>
> Joerg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
--
"Giving up smoking is the easiest thing in the world. I know because I've done it thousands of times."
Mark Twain (11/30/1835 - 04/21/1910)
My PGP Key is available at http://pgp.dtype.org:11371/pks/lookup?op=get&search=0x6FC4BCDE
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: XSLTTransformer with a different source
Posted by Joerg Heinicke <jo...@gmx.de>.
On 30.06.2004 16:00, Marius Oancea wrote:
> Hi,
> I have a web application that partly uses cocoon.
> [ANOTHER APP] I have a xslt that is applied during a pipe.
>
> Now, in a servlet i have the XSLT extracted from a database.
>
> I put this bytearray into request.
> [COCOON]
> I can create a custom transformer that read the bean from request (my
> XSLT) but how to create a Source object out of it?
>
> I tried to extend TraxTransformer to do the job but I cannot
> succesfully create a excalibur source out of a DOM representing the
> XSLT. (I can create SAXSource, DOMSource, InputStream or anything else).
>
> My approach is wrong ?
>
> Any other proposal ?
What about http://wiki.cocoondev.org/Wiki.jsp?page=XModuleSource?
Another approach is a source that reads the stylesheet code from
database and parses it.
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org