http://www.w3.org/TR/xslt中的这句完全没法搞懂!谁解释一下?
大可山人 博客专家认证 2004-04-04 01:41:30 The key can be used to retrieve a key from a document other than the document containing the context node. For example, suppose a document contains bibliographic references in the form <bibref>XSLT</bibref>, and there is a separate XML document bib.xml containing a bibliographic database with entries in the form:
<entry name="XSLT">...</entry>
Then the stylesheet could use the following to transform the bibref elements:
<xsl:key name="bib" match="entry" use="@name"/>
<xsl:template match="bibref">
<xsl:variable name="name" select="."/>
<xsl:for-each select="document('bib.xml')">
<xsl:apply-templates select="key('bib',$name)"/>
</xsl:for-each>
</xsl:template>
举例说明一下,好吗?