This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: document() revisited


> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]