xsl:key

xsl:key

The <xsl:key> element declares a named key which can be used elsewhere in the stylesheet with the key( ) function.

Syntax

<xsl:key name=NAME match=EXPRESSION
	use=EXPRESSION /> 

Required Attributes

name
Specifies a name for this key. Must be a QName.
match
Defines the nodes for which this key is applicable.
use
Specifies an XPath expression that will be used to determine the value of the key for each of the applicable nodes.

Optional Attributes

None.

Type

Top-level, must be the child of <xsl:stylesheet> or <xsl:transform>.

Defined

XSLT, section 12.2.

Gecko support

Supported.

© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/XSLT/key

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部