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

RE: How can I bend generate-id()?

Subject: RE: How can I bend generate-id()?
From: "Charles Knell" <cknell@xxxxxxxxxx>
Date: Fri, 26 Jul 2002 14:11:31 -0700
kathryn knell
Thanks for your quick reply. About five minutes after I posted the message,
the answer came to me. My solution was identical to yours except for
the acutal appended constants. You'll see it posted here.

-- 
Charles Knell
cknell@xxxxxxxxxx - email


---- "Hunsberger, Peter" <Peter.Hunsberger@xxxxxxxxxx> wrote:
> >Is there some way in which I could "bend" generate-id() so as to produce
> >two or more unique id's from the same context node? 
> 
> Since the id will be unique for each invocation of the template why
> not just
> append a constant to each generate?  IE:
> 
> Here is the template and the output:
> template
> ===================================================
> <xsl:template match="node">
>   <xsl:param name="depth" select="0" />
>   <xsl:param name="tabSize" select="1" />
>   <div id="{generate-id()}_1" drag="enable"
> style="position:relative;left:{$tabSize
> * $depth}px;">
>     <xsl:variable name="level">
>       <xsl:value-of select="$depth + 1" />
>     </xsl:variable>
>     <xsl:if test="$depth != 0">
>       <img src="{$bulletURL}" id="{generate-id()}_2" />
>     </xsl:if>
>     <textarea id="{generate-id()}_3" class="editableNode" onfocus="Sink()"
> onblur="Sink()">
>       <xsl:value-of select="normalize-space(text()[position()=1])"
> />
>      

 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.