The most likely explanation is that ExchangerXML is invoking Saxon without supplying a base output URI, meaning that the relative URI passed in the href attribute of xsl:result-document can't be resolved. To confirm this theory you'll have to ask the ExchangerXML developers. Or you might be able to work around it by supplying an absolute URI (starting file://...) as the href value.

Michael Kay

On 08/01/2013 21:23, padraic stack wrote:
I am trying to split an xml file into a number of html files. I am using <xsl:result-document> to do so.

I can do this and it works with Saxon HE (in oXygen). I need it to work with the version of Saxon used in Exchanger xml (Saxon XSLT 2.0).

My xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="trans.xsl"?>
            <page pageID="101">
                <paragraph paraID="1">
                    <sentence>... </sentence>
                <page pageID="102">

My xsl is as follows:

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="" version="2.0">
        <xsl:template match="/">
            <xsl:for-each select="//page">
            <xsl:result-document method="html" href="{@pageID}.html">
                          Page <xsl:value-of select="@pageID"/>

Using Exchanger (Saxon 2.0) gives me the following error

> [] Starting transformation ... FATAL ERROR: Exception thrown by
> OutputURIResolver; SystemID:
> file:/C:/Users/jack/trans.xsl;
> Line#: 5; Column#: -1 FATAL ERROR: Exception thrown by
> OutputURIResolver
> Transformation Interrupted!

I am aware that having the href value being a string would cause this error but I'm using the attribute value.

Does anyone have any ideas on where the problem might be?



Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:

saxon-help mailing list archived at