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="http://www.w3.org/1999/XSL/Transform" 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?