
February 11th, 2011, 09:55 AM
|
|
Registered User
|
|
Join Date: May 2009
Posts: 3
Time spent in forums: 26 m 52 sec
Reputation Power: 0
|
|
|
Can't get result-document to work
Can't get this code to work. Tells me result-document the href has already been created when I transform the XSL file in xmlspy. Likely to do with the filename variable but could be the foreach that's wrong.
xml structure is root/dept/sub-dept if that helps. There can be multiple dept and multiple sub-dept in that.
Code:
<xsl:for-each select="//dept/sub-dept">
<xsl:variable name="name" select="sub-dept"/>
<xsl:variable name="filename" select="concat('output1/',$name,'.html')" />
<xsl:value-of select="$filename" />
<!-- Creating -->
<xsl:result-document href="{$filename}" format="html">
</xsl:result-document>
</xsl:for-each>
appreciate the help.
|