Subject: Re: Re: fn:collection and result-document problem
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Mon, 24 Mar 2008 09:33:16 -0400
|
Ufff... You are right. That was the problem.
thanks,
-Rob
On Mon, 2008-03-24 at 14:20 +0100, Martin Honnen wrote:
> Robert Koberg wrote:
>
> > The transformation does reach the match="/" mode="jspx" template, but
> > fails to write the file producing the error:
> >
> > "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 ..."
> >
> > That is why I don't understand. The temporary tree that I use
> > successfully to write the files (from the previous post) uses the exact
> > same source and destination URIs as the method above. Don't get it...
>
> What I suspect is that you have
> <xsl:template match="/">
> <xsl:apply-templates
> select="collection($jspx-includes-dir)"
> mode="jspx"/>
> </xsl:template>
> and then later your
> <xsl:result-document href="{$page-path}">
> <xsl:apply-templates select="$jspx-doc"/>
> </xsl:result-document>
> ends up calling the above root node template again.
> Just a guess, but that would explain why you get the error message about
> trying to write to an already opened file.
|