I'm using the Saxon 9.4-HE library for .NET. When I try to compile the XsltCompiler into an XsltExecutable, I get this error:
A first chance exception of type 'org.apache.xerces.impl.XMLEntityScanner$1' occurred in saxon9he.dll
The code that leads to the error is:
var processor = new Saxon.Api.Processor();
var compiler = processor.NewXsltCompiler();
compiler.ErrorList = new List<Saxon.Api.StaticError>();
varexecutable=compiler.Compile(@"file:///C:/My/Xsl/shouldwork.xsl");/// ERROR HERE
The ErrorList property is not populated with any errors. The XSL file definitely exists at that location and the .NET Uri class considers it well-formed. I have used this same stylesheet in Altova to run transformations and it worked fine.
Can someone suggest something I can try to troubleshoot this further?
Daniel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm using the Saxon 9.4-HE library for .NET. When I try to compile the XsltCompiler into an XsltExecutable, I get this error:
A first chance exception of type 'org.apache.xerces.impl.XMLEntityScanner$1' occurred in saxon9he.dll
The code that leads to the error is:
var processor = new Saxon.Api.Processor();
var compiler = processor.NewXsltCompiler();
compiler.ErrorList = new List<Saxon.Api.StaticError>();
The ErrorList property is not populated with any errors. The XSL file definitely exists at that location and the .NET Uri class considers it well-formed. I have used this same stylesheet in Altova to run transformations and it worked fine.
Can someone suggest something I can try to troubleshoot this further?
Daniel
Could I suggest you use the forums at saxonica.plan.io in future? This forum is rather dormant.
I think the most likely explanation of the problem is an encoding error or other low-level error reading the file.
Sure, I thought this was the right forum, the Saxonica website directed me here - http://www.saxonica.com/contact/contact.xml
Should I cross-post this on that forum?
Thanks, I've updated that page now.
Michael Kay
Saxonica
On 22/02/2013 18:31, Daniel Longest wrote: