Solved

populate a list xml xsl

Posted on 2013-11-08
3
184 Views
Last Modified: 2013-11-08
Sear all,
How say this phrase:
<xsl:for-each select="/Component/Lists/List[@name = '@ListName' ]/Item">

where @ListName attribute of current node.


thanks,
0
Comment
Question by:ethar1
  • 2
3 Comments
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
ID: 39634135
<xsl:variable name="listn" select="@ListName"/>
<xsl:for-each select="/Component/Lists/List[@name = $listn]/Item">
0
 

Author Comment

by:ethar1
ID: 39634293
can do it with another way , without using variable?
0
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 39634737
what is the point in doing it without a variable?

it is XSLT no? I am pretty certain the most robust way is with a variable.
I guess you could use current(), but I find that less readable, easier to break in a later maintenance cycle and most likely less performant
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now