Solved

populate a list xml xsl

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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 …
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

708 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

15 Experts available now in Live!

Get 1:1 Help Now