Thanks for the response. The cause wasn't exactly this, because we were already using  an URIResolver.  However we haven't set the system id for the resolved source. I've figured this out when I've looked into saxon sources. I should have done that in the first place :(

Best regards

Milan Ostry

> Od:
> Komu: "'Mailing list for SAXON XSLT queries'" <>
> Datum: 29.01.2007 14:48
> Pøedmìt: Re: [saxon] Cannot create Templates from stylesheets that resideinsidejar
>I will be "fixing" this in the next release: or more strictly, I will be
>introducing the same bug as is present in Xalan, in response to user demand.
>Here's the extract from the change log:
><p>On the Java platform, the <code>jar:</code> URI scheme is now supported.
>Previously URIs using this scheme could be dereferenced, but relative URIs
>could not be resolved against a base URI using this scheme. This is because
>the <code></code> class doesn't handle such resolution, which in
>turn is because the syntax of URIs in this scheme does not actually follow
>the RFC specifications for hierarchic URIs. However, they are supported by
>the <code></code> class, which Saxon now uses to perform
>resolution of these relative URIs. This means, for example, that it is
>possible to hold stylesheet modules in a JAR file and resolve
><code>xs:include</code> and <code>xs:import</code> references between files
>within the same JAR archive. For details of the <code>jar:</code> scheme see
>the javadoc for class <code></code>.</p>
>Technically this is non-conformant behavior. Relative URIs in xsl:include
>and xsl:import are supposed to be resolved as defined in RFC 2396, and if
>you do that, you get the current Saxon behavior, which is a consequence of
>the fact that Sun's (unregistered) "jar:" URI scheme does not follow the RFC
>syntax, and cannot be resolved using Sun's own implementation.
>I'm normally very reluctant to introduce a non-conformance into the product
>purely to improve usability or interoperability. However, in this case I
>think the damage done by Sun's poor decisions in this area cannot be undone,
>and the least I can do is mitigate the pain for users.
>Meanwhile, you can write your own URI resolver to handle this case: just
>detect that the "jar:" URI scheme is being used, and use the
>class to resolve the relative URI in place of the more standards-conformant
>Michael Kay
>> -----Original Message-----
>> From: > [] On Behalf > Of
>> Sent: 29 January 2007 13:17
>> To:
>> Subject: [saxon] Cannot create Templates from stylesheets > that reside insidejar
>> > > >  Hi,
>>   >   we are currently using Xalan as our XSLT processor within > JEE aplication deployed on Weblogic. We are considering > switching to saxon 6.5.5, but we encountered following error:
>>   >   Caused by: java.lang.NullPointerException
>>           at >
>> t(XSLGeneralIncorporate
>>           at >
>> .java:418)
>>           at >
>>           at > com.icl.saxon.PreparedStyleSheet.setStyleSheetDocument(Prepare
>>           at > com.icl.saxon.PreparedStyleSheet.prepare(
>>   >   There is only one master stylesheet in our application, all > others are included relative to this one. Stylesheets are > packed in a jar module and furthermore in a ear archive. The > code we used with Xalan to constuct templates:
>>  >  tFactory = TransformerFactory.newInstance();  url = > SomeClass.class.getResource(xslFile);
>>  templates = tFactory.newTemplates( new StreamSource( > url.openStream() ) );
>>  >  With saxon the exception described above is thrown on the > last statement.
>>  >  Thank you for any idea.
>>  >  Milan
>>  >   >   >  >  >  > > > --------------------------------------------------------------
>> -----------
>> Take Surveys. Earn Cash. Influence the Future of IT Join >'s Techsay panel and you'll get the chance to > share your opinions on IT & business topics through brief > surveys - and earn cash >
>> _______________________________________________
>> saxon-help mailing list
>Take Surveys. Earn Cash. Influence the Future of IT
>Join's Techsay panel and you'll get the chance to share your
>opinions on IT & business topics through brief surveys - and earn cash
>saxon-help mailing list