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: newbie : dynamic include


> 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

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