|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XSL If Statement - Repost
Hi David,
The Matrix tag is present only once in the XML. So is there any way I can
avoid the outer for-each loop:
xsl:for-each select="topic/detail"
I tried xsl:if test="topic/detail/matrix=1" but it didn't work.
I guess if I can eliminate the outer for-each loop, it might solve the
problem.
I want to write something like below:
xsl:if test="topic/detail/matrix=1"
table border="2"
xsl:for-each select="topic/detail/table/state
tr
td STYLE="font-weight: bold;vertical-align: top;"> xsl:value-of
select="statename"
td STYLE="vertical-align: top;"> xsl:value-of select="statedesc"
tr
The xml looks like below:
topic>
detail>
matrix>1
table>
state>
statename>
statedesc>
Please note that Table and matrix tags are grand children of detail, state is
child of table and repeats many times in the xml. Matrix tag appears only
once.
P.S. - When I give the actual XSLT code in Plain text, for some reason nobody
can see the code in the posted email.
_________________________________________________________________
Searching for the best deals on travel? Visit MSN Travel.
http://msn.coxandkings.co.in/cnk/cnk.do
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








