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 9.3.0.5 (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"?>
<book>
<chapter>
<page pageID="101">
<paragraph paraID="1">
<sentence>... </sentence>
...
</paragraph>
</page>
<page pageID="102">
....
</chapter>
</book>
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">
<html>
<head>
<title>
Page <xsl:value-of select="@pageID"/>
</title>
</head>
<body>
...
</body>
</html>
</xsl:result-document>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Using Exchanger (Saxon 2.0) gives me the following error
> [9.1.0.3] 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?
Regards,
Padraic