This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Loading an external file of index
- To: xsl-list at mulberrytech dot com
- Subject: Re: Loading an external file of index
- From: Eric van der Vlist <vdv at dyomedea dot com>
- Date: Thu, 22 Jun 2000 12:42:37 +0200
- References: <4.3.2.7.2.20000622094023.00aef090@pop.dial.oleane.com>
- Reply-To: xsl-list at mulberrytech dot com
Pierre,
> So, the question is where do I declare <xsl:key name="mysetofkeys"
> match="key" use="@name"/> for being able to fill the table with all keys
> from the imported file ?
The document function can also be used outside a template (it would be
more touchy if the name of the file you want to include depended on a
local value)...
I haven't tested it since my favorite XSLT processors is lacking key
support, but something like :
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html" indent="no"/>
<xsl:key name="mysetofkeys"
match="document('../shared/shared.xml')/keybase/key"
use="@name"/>
....
</xsl:stylesheet >
should work from my understanding of the rec.
You can also define document('../shared/shared.xml') as a global
variable to reuse it in your templates.
Hope this helps.
Eric
--
------------------------------------------------------------------------
Eric van der Vlist Dyomedea http://dyomedea.com
http://xmlfr.org http://4xt.org http://ducotede.com
------------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list