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

RE: generate-d( ) not working

Subject: RE: generate-d( ) not working
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Tue, 1 Jul 2003 22:45:53 +0100
hsi hss
> 
> I am trying to use generate-id() to create links inside my 
> output HTML:
> 
>   <xsl:template name="Link" match="//HSS">
> 	<xsl:for-each select=".">

Why are you doing this? It is a no-op. There is only one context node,
and it is already the context node, so iterating over it isn't going to
achieve much.

> 		<img src="texticon.gif"><a href="#{generate-id(HSS)}">

Your context node is an HSS element, and I suspect it does not have a
child called HSS. I imagine that you meant to write generate-id(.).

Michael Kay.

> 		<xsl:value-of select="@name" /></a><br /></img>
>     </xsl:for-each>
>   </xsl:template>
> 
>   <xsl:template match="//HSS">
>     <xsl:for-each select=".">
> 		<a name="{generate-id(HSS)}">
> 		<xsl:value-of select="@name" /><br />
> 		<xsl:value-of select="@required" /></a><br />
>     </xsl:for-each>
>   </xsl:template>
> 
> --------------------------------------------------------------
> --------------
> ---------------
> <HSC contractName="myService" startDate="Jun-23-2003">
> 	<imagePath />
> 	<HSDCT list="true" name="Inputs" required="true" >
> 		<HSS name="text" required="true" />
> 		<HSI name="integer" required="true" />
> 			<DefaultValue>false</DefaultValue>
> 		</HSI>
> 		<HSDCT name="Inputs1" required="true">
> 			<HSS name="text1" required="true" />
> 			<HSI name="integer1" required="true" />
> 			<HSDCT name="Inputs11" required="true" >
> 				<HSS name="text11" required="true"  />
> 				<HSI name="integer11" required="true" />
> 			</HSDCT>
> 		</HSDCT>
> 	</HSDCT>
> </HSC>
> --------------------------------------------------------------
> --------------
> ---------------------
> When i use the generate-id function the way i am, it puts the 
> data (@name,
> @required) right after each field. In this case, it puts the 
> data after the text and the link doesn't seem to work. I 
> would like to put this data after it has processed 
> everything. Is it possible?
> 
> Appreciate any hints or help in this regard.
> 
> Thank you,
> 
> John
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 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.