Hi,
I am trying to transform a directory of XML files from one directory to
another. The XSL below fails with an error saying:
"Cannot write more than one result document to the same URI, or write
to a URI that has been read: file:/path/to/my/source.xml ..."
If I comment out the result-document instructions, the xsl:message list
all of the unique file paths. In other words, I am not trying to write
more than one result document to the same URI or trying to write to a
URI that has been read. What am I doing wrong?
...
<xsl:apply-templates
select="collection($jspx-includes-dir)"
mode="jspx"/>
...
<xsl:template match="/" mode="jspx">
<xsl:variable name="jspx-doc" select="."/>
<xsl:variable name="page-path"
select="concat($output-dir, '/WEB-INF/jspx/',
tokenize(document-uri(/), '/')[last()])"/>
<xsl:message>
JSPX: <xsl:value-of select="$page-path"/>:
</xsl:message>
<xsl:result-document href="{$page-path}">
<xsl:apply-templates select="$jspx-doc"/>
</xsl:result-document>
</xsl:template>
thanks,
-Rob
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--