The generate-id function generates a unique id for the first node in a given node-set and returns a string containing that id.
Syntax
generate-id( [node-set] )
Parameters
node-set(optional)- : An id will be generated for the first node in this node-set. If omitted, the current context node will be used.
Return value
A string containing the generated id.
Description
- The same id must be generated every time for the same node in the current document in the current transformation.
- The generated id may not be the same in subsequent transformations.
This function is an XSLT-specific addition to XPath. It is not a part of the core XPath function library.
Specifications
Gecko support
Supported.
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
