Bug #2073

Can't use XML from string

Added by Jeroen Bobbeldijk about 4 years ago. Updated almost 4 years ago.

Start date:
Due date:
% Done:


Found in version:
Fixed in version:


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.


#1 Updated by O'Neil Delpratt about 4 years ago

  • Category set to PHP API
  • Status changed from New to In Progress
  • Assignee set to O'Neil Delpratt
  • Found in version set to 0.2

Thanks for reporting the bug you have found. I managed to reproduce it and I am now investigating it.

#2 Updated by O'Neil Delpratt about 4 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 XsltProcessor and XQueryProcessor, respectively.

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(
    at net.sf.saxon.Controller.prepareInputTree(
    at net.sf.saxon.Controller.transform(
    at net.sf.saxon.s9api.XsltTransformer.transform(
    at net.sf.saxon.option.cpp.XsltProcessorForCpp.xsltApplyStylesheet(

#3 Updated by O'Neil Delpratt almost 4 years ago

  • Status changed from Resolved to Closed
  • Fixed in version set to 0.3.1

Bug fixed in Saxon/C bete release 0.3.1

Please register to edit this issue

Also available in: Atom PDF