[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: choose an "artificial" root node

Subject: Re: choose an "artificial" root node
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx (by way of B. Tommie Usdin)
Date: Wed, 14 Feb 2001 13:24:06 -0500
Re:  choose an "artificial" root node
Date: Wed, 14 Feb 2001 17:18:21 GMT
Message-Id: <200102141718.RAA06761@xxxxxxxxxxxxxxxxx>
Received: by penguin.nag.co.uk (8.9.3) id RAA06761; Wed, 14 Feb 2001 17:18:21 GMT
From: David Carlisle <davidc@xxxxxxxxx>
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
In-reply-to: <006401c096a7$a0950740$5c4ed686@rfvpc36>
(schwebel@xxxxxxxxxxxxxxxx)
Subject: Re: choose an "artificial" root node
References: <POEMLHLHPPILCJKHBIAAEEENCAAA.andrew@xxxxxxxxxxxxxxxxxxxxxxx> <006401c096a7$a0950740$5c4ed686@rfvpc36>



 I thought it would work.... but the generated id is different each time the
 document is loaded ! What is an id good for if it changes everytime ?

the id is unique within a run of the stylesheet so it can be used in xslt code to identify a node as in <xsl:if test="generate-id(.)=generate-id($xx)"> or it can be used to generate ids and internal links in teh output so long as you don't mind that they are unstable and change if document regenerated.

To get stable ids either get them from the source or use something like
<xsl:number/> to generate a unique id.
ie <xsl:attribute name="id">foo<xsl:number level="any"
count="foo"/></xslattribute"/>

will generate attribute values foo1 foo2 etc on foo elements.

david

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.