943,865 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 788
  • ASP.NET RSS
Oct 7th, 2008
0

XSL related question

Expand Post »
Hi I wasn't sure as to where I need to post XSL related questions..Is there anyone in this group who has expertise with XSL? If anyone can help me out with an XSL related question, that would be great.

Ani
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
anithajoe is offline Offline
9 posts
since Oct 2008
Oct 7th, 2008
0

Re: XSL related question

Take a look at this for dynamic variable names with xsl.

http://bytes.com/forum/thread758105.html
Reputation Points: 133
Solved Threads: 141
Veteran Poster
dickersonka is offline Offline
1,162 posts
since Aug 2008
Oct 7th, 2008
0

Re: XSL related question

In the code below I am just writing a simple for loop in XSL...Instead of creating a dynamic variable name, I have created a variable called sublink1 and later give a dynamic value to it based on loop variable's current value...Later construct a link with "sublink1"..Concept works fine without the for-each..I mean it generated only one link rather than 2 links...But when i give for-each, it doesn't display either of the links...

XML file:
<item>
<count>one</count>
<sub>2</sub> /*this tells the XSL file as to how many sublinks are listed..I
have used that for running the for loop*/
<sublink1>http://www.yahoo.com</sublink1>
<subtitle1>Yahoo</subtitle1>
<sublink2>http:www.google.com</sublink2>
<subtitle2>Google</subtitile2>

</item>

XSL file:

<div id="sublinklist" align="left" class="anylinkcss" style="width: 70.5px; background-color: black">
<xsl:for-each select="$sub">
<xsl:variable name="sublink1">
<xsl:value-of select="concat('sublink',$sub)"/>
</xsl:variable>
<xsl:variable name="subtitle1" select="subtitle1"/>
<a href="{sublink1}">
<xsl:value-of select="subtitle1"/>
</a>
</xsl:for-each>
</div>

Any suggestions?

Ani
Take a look at this for dynamic variable names with xsl.

http://bytes.com/forum/thread758105.html
Reputation Points: 10
Solved Threads: 0
Newbie Poster
anithajoe is offline Offline
9 posts
since Oct 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: How to have only administrator for the website
Next Thread in ASP.NET Forum Timeline: JS don't include window.open popup in browser history





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC