xsl-list
[Top] [All Lists]

Re: [xsl] relative URI in href

2008-08-24 18:10:59
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

  

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>