On 01.03.2004 15:10, [EMAIL PROTECTED] wrote:

Hello ,

I'm migrating my application towards cocoon. In my old code I have the code
below in which I initialize a transformer. I would like to know the
equivalent of the setSystemId method in cocoon. Is there a way to set the
system Identifier in the cocoon sitemap ? I need the system identifier to
resolver relative URLs used in my "base" stylesheet (example.xslt) which
contains a <xsl:include> tag which needs to be resolved with this system
identifier.

Javax.xml.transform.TransformerFactory tf =
javax.xml.transform.TransformerFactory.newInstance();
URL xslUrl = new URL("/test/example.xslt");
javax.xml.transform.stream.StreamSource aStreamSource = new javax.xml.transform.stream.StreamSource(xslUrl.openStream());


 aStreamSource .setSystemId("test/prodhtml/");
 javax.xml.transform.Transformer htmlTransformer =
tf.newTransformer(aStreamSource);

If I understand this correctly you want to resolve the URLs inside the stylesheet relative to another place than the stylesheet is located. This should not be possible with Cocoon AFAIK. You probably have to extend the TraxTransformer yourself. What's the use case of this?


Joerg

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



Reply via email to