This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

SV: XSL:if .. Attribute


You can use for example:

<xsl:template match="partnerName">
	<xsl:choose>
		<xsl:when test="@kurstype='private'">
			do something ...
		</xsl:when>
		<xsl:when test="@kurstype='Unternehmer'">
			do something ...
		</xsl:when>
		<xsl:otherwise>
			do something ...
		</xsl:otherwise>
	</xsl:choose>
</xsl:template>

An so on.

-----Ursprungligt meddelande-----
Fran: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com]For Loren Lai
Skickat: den 21 juni 2001 16:06
Till: XSL-List@lists.mulberrytech.com
Amne: [xsl] XSL:if .. Attribute


Hello,

Can someone help me please.

This is my XML-File:

       <partner>
       <partnerName kursType="private"               
role="HE">Deutsche Bank AG</partnerName>
        <modul id="1">Finanzielle
Verhaeltnisse</modul>
        <modul id="2">Kontofuehrung</modul>
        <modul id="3">Markt und Wettbewerb</modul>
        <modul id="4">Management</modul>
       </partner>
       <partner>

.... I would like to have a XSL which checks the
attribute kursType b4 it prints out the element.

For example :
if kursType==private then print pic1.gif
if kursType==Unternehmer then print pic2.gif
Else print out anotherpicture.gif

Can comeone helps me to write this xsl-file ? or how
does the syntax looks like ?

thank you very much !

Loren :) 

=====
Gruss,

Loren Lai :)
Email:lorenlai@yahoo.com

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]