Can't use XML from string
When I try to load my XML from a string (using parseString and then setSourceValue), showing the result fails, it can't transform. It looks like the XML to XdmValue is not correct.
When I write the same file to a temporary file and use setSourceFile, everything works fine.
PHP version 5.4.
#2 Updated by O'Neil Delpratt almost 3 years ago
- Status changed from In Progress to Resolved
- Priority changed from Low to Normal
- % Done changed from 0 to 100
This bug has now been fixed which will be available in the next release.
The issue was after we create the
XsltProcessor object we then create the
XQueryProcessor using the java constructor which creates a new
Processor object; this has the effect of overwriting the
Processor object in the c++ controller class, i.e.
SaxonProcessor. We now create the
Processor object from the SaxonProcessor which is then reused in the
What I found useful was to look at the php log file. We see the java exception below, which gave clues as to what was happening:
Exception in thread "main" java.lang.IllegalArgumentException: Externally supplied NodeInfo belongs to the wrong Configuration at net.sf.saxon.Configuration.unravel(Configuration.java:3087) at net.sf.saxon.Controller.prepareInputTree(Controller.java:1955) at net.sf.saxon.Controller.transform(Controller.java:1846) at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:450) at net.sf.saxon.option.cpp.XsltProcessorForCpp.xsltApplyStylesheet(XsltProcessorForCpp.java:340)
Please register to edit this issue