[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Loading an external file of index

Subject: Re: Loading an external file of index
From: Eric van der Vlist <vdv@xxxxxxxxxxxx>
Date: Thu, 22 Jun 2000 12:42:37 +0200
Re: Loading an external file of index
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.