Generating Temporary IDs for Nodes

The generate-id() function, defined in the XSLT recommendation, generates temporary IDs for nodes.

Caution

 

The ID generated by the generate-id() function is not an object ID. The value generated by the generate-id() function is guaranteed to be the same only during an XSL transformation. If the source document changes, the value for this ID can change.

Format

The format for the generate-id() function is as follows:

string generate-id(node-set?)
               

            

The generate-id() function returns a string that uniquely identifies the node in node-set that is first in document order. This string starts with xln and ends with eight hexadecimal digits. Syntactically, the string is an XML name.

If the node-set argument is empty, the generate-id() function returns an empty string. If you omit the node-set argument, the generate-id() function generates a temporary ID for the context node.

Chemical Companies That Use Stylus Studio

When working in a lab it's always important to have the right ingredients. That's why top chemical companies use Stylus Studio 2006 to create the ultimate experiments. See which of these top chemical companies are using Stylus Studio today!

FLWOR - An Introduction to the XQuery FLWOR Expression

An XQuery FLWOR Tutorial, covering an introduction to the main constructs of the XQuery FLWOR expression, including: For, Let, Where, Order By, and Return. Written by the W3C's Dr. Michael Kay.

XSL-List Blog

XSL-List is a discussion forum on the Extensible Stylesheet Language (XSL), covering the XSL specification, XSL processors, tools, user questions, trends and more. Bookmark this RSS or ATOM feed now!

XQuery Talk

Join the XQuery Talk mailing list for a practical discussion about XQuery. It's a place to work together to learn a new language, talk about problem solutions, discuss engines and implementations, chat about the latest XQuery news and more.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member