简体   繁体   中英

The unparsed-text() function doesn't work when Saxon 11 is run from ANT

I'm using Saxon 11 from ANT . XSLT transformation works, except that the unparsed-text() function triggers a fatal error. Error message:

Resolver for unparsed-text() returned non-StreamSource;

Software: SaxonEE11-3J, Ant 1.10.3, Java openjdk 1.8.0.191 win64, Windows 10 Pro

Ant code:

<path id="xslt.saxonEE.classpath">
    <fileset dir="D:/SaxonEE11-3J">
        <include name="*.jar"/>
    </fileset>
</path>

<target name="target-test">
    <xslt in="C:/input.xml" style="D:/test.xsl" out="C:/test.xml" force="true" processor="trax">
        <classpath refid="xslt.saxonEE.classpath"/>
        <factory name="com.saxonica.config.EnterpriseTransformerFactory">
            <attribute name="http://saxon.sf.net/feature/ignoreSAXSourceParser" value="true"/>
            <!--<attribute name="http://saxon.sf.net/feature/unparsedTextURIResolverClass" value="net.sf.saxon.lib.StandardUnparsedTextResolver"/>-->
        </factory>
    </xslt>
</target>

As Mike observes, the XSLT 1.0 based interfaces are getting a bit long in the tooth. However, I think it would probably be possible to support this request. I've opened bug 5582 to track it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM