Can't run saxon7.8 from oxygen

Having trouble installing Oxygen? Got a bug to report? Post it all here.
gdim
Posts: 3
Joined: Wed Feb 04, 2004 11:26 pm

Can't run saxon7.8 from oxygen

Post by gdim »

In the preferences JAXP Transformer is set to "net.sf.saxon.TransformerFactoryImpl" and transformation is configured to use JAXP. When I click the Apply Transformation button oxygen shows single error line, with Info(-) and Description(null).

I can run same transformation from command line with no problems ("java.exe net.sf.saxon.Transform same.xml same.xslt")

What am I doing wrong?
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

You should also place saxon7.jar in the oxygen/lib directory. See
http://www.oxygenxml.com/doc/HowToConfi ... former.pdf
for step by step instructions.

Best Regards,
George
gdim
Posts: 3
Joined: Wed Feb 04, 2004 11:26 pm

I tried that before

Post by gdim »

The saxon7.jar is in the lib directory. And oxygen does find it, because if I change net.sf.saxon.TransformerFactoryImpl to something else then the tranformation produces nice error message that class could not be created. However when I have it configured according to that PDF I get the useless (null, -) error message. Have you tried Saxon 7.8?
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

Yes, I tried with Saxon 7.8. It may be something related with the specific transformation you are trying. Does it work with Saxon 6.5.3 (when you choose Saxon as XSLT engine) ? Please try one of thr transformations from oXygen samples, for instance run personal.xml through personal.xsl and let me know your results.

Best Regards,
George
gdim
Posts: 3
Joined: Wed Feb 04, 2004 11:26 pm

Problem is related to namespaces

Post by gdim »

I tried personal.xml/.xsl and it works fine with all transformers, including Saxon 7.8 untill I add namespace declaration to <personnel> element. For example like this:

<personnel xmlns="urn:test">

After this Saxon7.8 transformer gives error (null, -), while older built-in saxon and xalan transformers still work fine. Note that Saxon 7.8 transform will work ok with namespaces if I run it from command line outside oxygen.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

The error is a NPE inside Saxon 7.8 code:

Code: Select all


java.lang.NullPointerException
at net.sf.saxon.om.NamePool.getPrefixIndex(NamePool.java:324)
at net.sf.saxon.om.NamePool.allocate(NamePool.java:385)
at net.sf.saxon.om.NamePool.allocate(NamePool.java:370)
at net.sf.saxon.dom.NodeWrapper.getNameCode(NodeWrapper.java:304)
at net.sf.saxon.dom.NodeWrapper.getFingerprint(NodeWrapper.java:353)
at net.sf.saxon.trans.Mode.getRule(Mode.java:160)
at net.sf.saxon.trans.RuleManager.getHandler(RuleManager.java:167)
at net.sf.saxon.Controller.applyTemplates(Controller.java:317)
at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:140)
at net.sf.saxon.instruct.ApplyTemplates.process(ApplyTemplates.java:76)
at net.sf.saxon.instruct.Instruction.processChildren(Instruction.java:194)
at net.sf.saxon.instruct.FixedElement.processLeavingTail(FixedElement.java:128)
at net.sf.saxon.instruct.Instruction.process(Instruction.java:152)
at net.sf.saxon.instruct.Instruction.processChildren(Instruction.java:194)
at net.sf.saxon.instruct.FixedElement.processLeavingTail(FixedElement.java:128)
at net.sf.saxon.instruct.Instruction.processChildrenLeavingTail(Instruction.java:261)
at net.sf.saxon.instruct.Sequence.processLeavingTail(Sequence.java:144)
at net.sf.saxon.instruct.Template.expand(Template.java:105)
at net.sf.saxon.instruct.Template.processLeavingTail(Template.java:74)
at net.sf.saxon.Controller.applyTemplates(Controller.java:329)
at net.sf.saxon.Controller.run(Controller.java:210)
at net.sf.saxon.Controller.transformDocument(Controller.java:1599)
at net.sf.saxon.Controller.transform(Controller.java:1366)
It appears only if the input document declares a default namespace.
I will post here further updates.

Best Regards,
George
Post Reply