Re: [xsl] relative URI in href

Subject: Re: [xsl] relative URI in href
From: Rolf Schumacher <mailinglist@xxxxxxxxx>
Date: Mon, 25 Aug 2008 01:10:31 +0200
Ok, Florent. ... just to let you know...

I switched back to the old version of the IDE and it worked as you
suggested.

I'm using the code:

URL url = this.class.getResource("includer.xsl");
Source xslt = new StreamSource(url.openStream());
xslt.setSystemId(url.toExternalForm());

The build tree is like

/p/package/MyClass.class
/p/package/includer.xsl
/p/pacakga/includee.xsl

It's pretty cool:
it works in JUnit tests with an open build tree, url-protocol is file:
and also as a service where everything is packed in jar
and the url-protocol is jar:file:.

Thank you very much for your  successful suggestions.

Rolf

Florent Georges wrote:
> Rolf Schumacher wrote:
>
>   
>> String path=package.Main.class.getResource("includer.xsl").getPath();
>> Source xslt = new StreamSource(new File(path));
>> xslt.setSystemId(path);
>> Transformer transformer =
>>   TransformerFactory.newInstance().newTransformer(xslt);
>> transformer.transform(srcXml, fo);
>>     
>
>   
>> Do you spot something wrong here?
>>     
>
>   No, I don't.  Maybe someone else will, here or on a list for your
> processor.  What is your processor?  What is within the path variable?
>
>   Regards,
>
> --drkm
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>       _____________________________________________________________________________ 
> Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr

Current Thread