RE: newbie : dynamic include

Subject: RE: newbie : dynamic include
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Thu, 13 Jul 2000 17:47:32 +0100
> Is it possible to include a file in a dynamic way?
> Something like this (which doesn't work :)
> <xsl:include href="{$include}"/>

Not directly. You can
- modify the stylesheet before use (e.g. by using another XSLT stylesheet)
- or use a URL in the <xsl:include> that refers to dynamically-generated
content, e.g. a servlet.

Some products may allow you to supply a URI resolver that interprets the URI
dynamically, but this is outside the scope of the standard.

You can write the variable part of the xsl:include statement as an XML
entity reference, though this only shifts the problem. However, there may
then be facilities in the XML parser to control how entity references are
resolved.

Mike Kay


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


Current Thread