Project

Profile

Help

Resolver for unparsed-text() returned non-StreamSource with Java Saxon-HE 11.1.1 (or higher)

Added by Christian Lafreniere about 2 months ago

Hi, I'm trying to upgrade from version 10.8 to 11.X. I call Saxon with the xslt ANT task from the Maven antrun plugin.

The attached sample works with 10.8. The archive contains the following:

saxon11_test/
saxon11_test/pom.xml
saxon11_test/src/json/input.json
saxon11_test/src/xsl/json2xml.xsl

To run it:

  • unzip the archive file
  • go into the saxon11_test folder
  • execute: mvn clean validate

But when I try with:

  • 11.1.1 by running mvn clean validate -Dsaxon.version=11.1.1
  • 11.2 by running mvn clean validate -Dsaxon.version=11.2
  • 11.3 by running mvn clean validate -Dsaxon.version=11.3

I get this error:

Fatal Error! Resolver for unparsed-text() returned non-StreamSource

Can someone explain to me what the problem is and what I need to do to fix it?

Thanks for your help, Christian


Replies (2)

Resolver for unparsed-text() returned non-StreamSource with Java Saxon-HE 11.1.1 (or higher) - Added by Norm Tovey-Walsh about 2 months ago

Saxonica Developer Community writes:

I get this error:

Fatal Error! Resolver for unparsed-text() returned non-StreamSource

Can someone explain to me what the problem is and what I need to do to
fix it?

The problem is that the APIs are moving forward as XSLT progresses and
ant is still using some quite old APIs. We try to support existing APIs
as long as it is practical.

In this case, the unparsed URI resolver expects a StreamSource response
and Ant provides a SAXSource. I’ve opened a bug to track this:

https://saxonica.plan.io/issues/5582

I think it’s likely we can support a SAXSource here, but there hasn’t
been a complete investigation yet.

I don’t have a complete workaround for 11.3. If you’re feeling
ambitious, you might be able to write your own UnparsedTextResolver and
supply it to Saxon.

Be seeing you,
norm

--
Norm Tovey-Walsh
Saxonica

    (1-2/2)

    Please register to reply