RE: document() revisited

Subject: RE: document() revisited
From: Linda van den Brink <lvdbrink@xxxxxxx>
Date: Wed, 16 Feb 2000 15:15:08 +0100
> I'm using XT with the xt:document extension and am stuck on the
> href expression:
> 
> <xsl:template match="html">
>  <!-- find me the path and put in a variable: for each html 
>       instance, it is the text in the corresponding file element 
>       in the "mother" xml document -->
>   <xt:document method="html" href="{$path}">
>  <!-- copy-of result or apply-templates or whatever -->        
>    </xt:document>
> </xsl:template>
> 
> Any ideas on filling the href?

<xsl:template match="html">
	<xsl:for-each select="document('filenames.xml')/mother/file">
		<xsl:param name="path" select="."/>
		<xsl:for-each select="document($path)">
			<xsl:param name="content"><xsl:copy-of
select="."/></xsl:param>
			<xt:document method="html" href="xsl/{$path}">
				<xsl:copy-of select="$content"/>
			</xt:document>
		</xsl:for-each>
	</xsl:for-each>
</xsl:template>

</xsl:stylesheet>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread