Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: how to include another XML document with XSLT? [Thread Next] Re: how to include another XML document with XSLT?To: NULL Date: 8/5/2004 10:11:00 PM Ilya Volodin wrote:
> You will have to use "document" operator to do this. Something like this
>
> <xsl:template match="yourxmltagname">
> <xsl:variable name="includedDoc" select="document('{@docname}')"/>
This is wrong. You can't use {} in any select attribute.
> <xsl:apply-templates select="$includedDoc"/>
> </xsl:template>
Try instead
<xsl:apply-templates select="document(@docname)/*"/>
PS. Note /* after document() function call. It's very easy to get
infinite loop without it:
<xsl:template match="/">
<!-- Infinite loop! -->
<xsl:apply-templates select="document(@docname)"/>
--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
