- From: James Clark <jjc@jclark.com>
- Date: Fri, 13 Aug 1999 11:04:31 +0700
- To: Jon Smirl <jonsmirl@mediaone.net>
- CC: xsl-editors@w3.org
You can already do this by leveraging the fact that you can get at the
stylesheet as an XML document:
<smirl:fragment id="xyzzy">
<whatever>
...
</whatever>
<smirl:fragment>
<xsl:template name="foo">
<xsl:call-template name="bar"
select="document('')//smirl:fragment[id='xyzzy']"/>
</xsl:template>
In a future version of XSLT, I agree it would be nice to make this more
convenient.
Jon Smirl wrote:
>
> I would really find it useful to have inline, static node-sets. For example,
> when generating a select list you need to loop though the list to figure out
> where to put the selected tag. The content is static and should be included
> in the stylesheet. Menus have the same problem.
>
> You can do this with external files and the document function, but
> performance is very slow. An inline node-set could be cached with the
> complied stylesheet, caching is much more complicated for a file being read
> via document().
>
> It would even be ok to allow document() to be called with a string of static
> XML.
>
> Jon Smirl
> jonsmirl@mediaone.net
Received on Friday, 13 August 1999 00:08:06 UTC