|
Home > Online Product Documentation > Table of Contents > xsl:key xsl:keyDeclares a key for a document. Format
Description
Keys provide a way to work with documents that contain an implicit cross-reference structure. A stylesheet declares a key for a document with the
The
Replace qname with the name of the key. You must specify a qualified name.
Replace pattern with a pattern that identifies one or more nodes that have this key. In other words, the nodes in the document that match the pattern are included in the key. The default is
Replace use with an expression that you want to use for the key values. The XSLT processor evaluates the expression once for each node in the set identified by pattern. Each key name represents a separate, independent set of identifiers. Each node included in a key is associated with a set of string key values. These values result from evaluating the use expression with that node as the current node. A document can contain multiple keys with the same node and the same key name, but with different key values. A document can contain multiple keys with the same key name and value, but with different nodes. In other words: The value of a key can be an arbitrary string. It need not be a name.
Use the XSLT
RestrictionYou cannot specify multiple declarations for the same key in a stylesheet. Stylus Studio expects to remove this restriction in a future release. |
XML-DEV Discussion Forum
XML-DEV is a leading technical forum for XML discussion and a valuable free XML learning resource. Subscribe to the XML-DEV email discussion forum today to help further your XML education.
HTML to XML Importer
Convert HTML to XML with the Stylus Studio HTML to XML Importer, a powerful, visual utility for Converting HTML to XML with ease.
Computing XML Differences in Stylus Studio
See for yourself just how easy it is to visually compare different XML files or folders using Stylus Studio's powerful new XML Differencing Utility. Quickly and easily analyze and merge changes made to different XML documents!
EDI to XML Mapping
A tutorial on how to transform EDI files into XML using Stylus Studio's Convert to XML tool. Subsequent post-processing of the converted EDI data is done through XQuery or XSLT, modeling a real world XML data integration application.