Solved

populate a list xml xsl

Posted on 2013-11-08
3
187 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

808 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