Project

Profile

Help

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

Added by Christian Lafreniere almost 2 years 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 (3)

Please register to reply

Resolver for unparsed-text() returned non-StreamSource with Java Saxon-HE 11.1.1 (or higher) - Added by Norm Tovey-Walsh almost 2 years 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

RE: Resolver for unparsed-text() returned non-StreamSource with Java Saxon-HE 11.1.1 (or higher) - Added by Air Quick 10 months ago

This is reproducible with 12.2, while not repro with 12.1.

    (1-3/3)

    Please register to reply