Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: need help for choose loop

From: "toudidel" <xml@---------.-->
To: NULL
Date: 8/1/2007 3:32:00 PM

U¿ytkownik "kamkaro" <kamkaro@d...> napisa³ w 
wiadomo¶ci news:053CF4F4-85DB-4705-A0D7-AB5C1937183E@m......
> Hi all,
> can someone tell me, how do i use choose/when loop in xslt. Actually, in 
> my
> 'Zm' node have attributes (ab, note and value). I have to display all 'ab'
> and 'note' and if note is not there than 'value' display instead of note. 
> i
> tried couple ways but having blank. really thankful.
> XML:
> <Zm ab="label" note="region sammmm"/>
> <Zm ab="label" note="region sammmm"/>
> <Zm ab="label" value="region sammmm"/>

<xsl:apply-templates select="Zm"/>

and in "Zm" template:

<xsl:value-of select="concat(@note,@value)"/> or something like that

of course my example doesn't work fine when Zm elements will contain both 
attributtes @note and @value, but I hope is faster than <xsl:for-each>

-- 
td
www.paranoja.org 




transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent