I was trying to get some more information from the stacktrace.  You referred to the actual compile time error message?  I'm not sure what you mean.  I couldn't extract any further information from the TransformerConfigurationException.  When i checked the Saxon source code, I found that it is probably an XPathException, but that exception's stack trace is not passed on when the new TransformerConfig..tion is thrown.  How would I get more information about the compilation error? 


javax.xml.transform.TransformerConfigurationException: Failed to compile stylesheet. 1 error detected.
        at net.sf.saxon.PreparedStylesheet.prepare (PreparedStylesheet.java:140)
        at net.sf.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:135)


On 7/7/07, Michael Kay < mike@saxonica.com> wrote:
OK, so you've picked up Saxon successfully.
 
Next idea: (I'm really guessing here, because you haven't shown me your Java code, or the XSLT code, or the actual compile time error message) - an xsl:include or xsl:import has failed to resolve, because you didn't supply the base URI of the principal stylesheet module. That is, you didn't call setSystemId() on the Source object supplied to newTemplates().
 
If this idea is also wrong, perhaps it's time to stop guessing and look at some diagnostics.
Michael Kayct
http://www.saxonica.com/


From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of ChadDavis
Sent: 07 July 2007 18:07
To: Mailing list for SAXON XSLT queries
Subject: Re: [saxon] stylesheet compiles with command line but notfromapplication

Thanks for the response.  Yeah, I was away from my info when I posted that email.  Sorry about that. 

Do you mean that maybe its picked up Xalan's XSLT processor instead of Saxon.  I'm don't think that is the case.
I'm pretty sure it Saxon.  Here's the top of the stack trace:

javax.xml.transform.TransformerConfigurationException: Failed to compile stylesheet. 1 error detected.
        at net.sf.saxon.PreparedStylesheet.prepare (PreparedStylesheet.java:140)
        at net.sf.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:135)

If it would help, I can provide the stylesheets themselves. 


Another bit of information . . . while toying around with confirming which XSTL implementation was being used, I pointed the TrasnformerFactory in several directions to see what would happen.  First of all, previously the application was, successfully, using  org.apache.xalan.processor.TransformerFactoryImpl from the Xalan jar.  I then pointed it to the XSLTC implementation in that same Xalan jar --
org.apache.xalan.xsltc.trax.TransformerFactoryImpl -- interestingly, the Xalan XSLTC implementation throws the same error as the Saxon.  I don't yet know enough to extract anything useful from this fact, but it seems like it could help.





On 7/7/07, Michael Kay <mike@saxonica.com> wrote:
The most likely explanation is that your application has picked up Xalan rather than Saxon. But you've provided so little information, it's really impossible to tell.
 
Michael Kay


From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of ChadDavis
Sent: 07 July 2007 12:48
To: saxon-help@lists.sourceforge.net
Subject: [saxon] stylesheet compiles with command line but not fromapplication

Hello.  I'm migrating an application to Saxon 8.9 B.  In the application, the stylesheets won't compile.  However, when I compile them from the Saxon command line interface, they compile just fine.  They do give the warning about XSLT1.0 under a 2.0 processor, but it works. 
 
What can be the difference?  Are there some different default configuration values using the command line versus using the application api?  Could it be that the command line is using some other resources, e.g. xml parser, that the application isn't using? 
 
Thanks,
Chad

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
saxon-help mailing list
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
saxon-help mailing list
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help