RE: [xsl] Space after <a> tag in text output

Subject: RE: [xsl] Space after <a> tag in text output
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 15 Dec 2004 17:09:19 -0000
> To process this I am writing the content of 
> <articledescription> into a temporary XML file using
> <redirect:write select="$xmlfile">
> 
> Then I read the temp XML file and apply template by:
> <xsl:apply-templates select="document($xmlfile)" mode="proc-txt"/>

It's a really bad idea to write and read the same file during the same
transformation, and the XSLT 2.0 spec explicitly bans it. The reason is that
it makes your stylesheet dependent on order of execution.

Why not create the temporary XML document in a variable?

Michael Kay
http://www.saxonica.com/

Current Thread