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]

How to use xsl:key for another document()


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


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