xsl-list
[Top] [All Lists]

Re: [xsl] Re: [saxon] How to make a simple running example using packages?

2014-10-19 10:54:47
On Sun, Oct 19, 2014 at 2:26 AM, John Lumley john(_at_)saxonica(_dot_)com
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:

Hi John,

For the moment, depending upon your situation, one of the following actions
may help:

1. Ensure that *every* package is required, i.e. the stylesheet can be
compiled only if every one of the supplied packages will be used. (If you're
trying using different package-version alternates, only the first will be
used and any subsequent ones will be compiled as 'separate stylesheets' and
may cause this NPE)

There are just two packages: "complex-arithmetic" and "using-package".

2. Try putting the principal stylesheet as the *last* in the semi-colon
separated list. Currently it will then be compiled last when essentially
every other package has already been compiled into the library.

Yes, I have specified the two packages in the required order, below is
the command-line invocation and the resulting exception/stack trace.

My guess is that maybe the names of the packages are violating some
expected naming convention, could you, please confirm?

C:\xml\XSLT3.0>C:\Java\jre6\bin\java.exe -Xms1024M -Xmx1024M  -jar
C:\xml\Parsers\Saxon\Ver.9.6\saxon9ee.jar  -t -repeat:1  t.xml
complex-arithmetic.xsl;using-package.xsl
Saxon-EE 9.6.0.1J from Saxonica
Java version 1.6.0_37
Using license serial number Vxxxxxxxxxx
Generating byte code...
java.lang.NullPointerException
        at net.sf.saxon.trans.PackageLibrary.getPackage(PackageLibrary.java:75)
        at 
com.saxonica.ee.packages.StylesheetPackageEE.spliceUsedPackage(StylesheetPackageEE.java:61)
        at 
com.saxonica.ee.packages.StylesheetPackageEE.spliceUsePackages(StylesheetPackageEE.java:43)
        at 
net.sf.saxon.style.StylesheetPackage.preprocess(StylesheetPackage.java:371)
        at net.sf.saxon.style.Compilation.compilePackage(Compilation.java:180)
        at net.sf.saxon.s9api.XsltCompiler.compilePackage(XsltCompiler.java:394)
        at 
net.sf.saxon.s9api.XsltCompiler.compilePackages(XsltCompiler.java:447)
        at net.sf.saxon.Transform.doTransform(Transform.java:582)
        at net.sf.saxon.Transform.main(Transform.java:80)
Fatal error during transformation: java.lang.NullPointerException:  (no message)
C:\xml\XSLT3.0>


-- 
Cheers,
Dimitre Novatchev
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

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