This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
How to use xsl:key for another document()
- To: <XSL-List at lists dot mulberrytech dot com>
- Subject: [xsl] How to use xsl:key for another document()
- From: Janning Vygen <vygen at planwerk6 dot de>
- Date: Tue, 31 Jul 2001 08:52:21 +0200
- Organization: Planwerk 6 /websolutions
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi,
I can use xsl:key only in my source tree, but how can i create a key
for another document?
what i would like to do is:
<xsl:variable name="doc1" select="document('doc1.xml'"/>
<xsl:key name="more-chapters" match="$doc1//chapter" use="@id"/>
But it doesnt work, of course, because its a match and not a select
attribute. But i could not either change the context document with
<xsl:for-each select="$document">
<xsl:key name="more-chapters" match="chapter" use="@id"/>
<xsl:for-each>
because xsl:key is a top-level element.
Is there another way to achieve this?
janning
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list