[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xsl:if and xsl:when

Subject: xsl:if and xsl:when
From: "Medina, Edward" <emedina@xxxxxxx>
Date: Wed, 29 Mar 2000 14:29:56 -0500
xsl when tes
I'm working on xsl and I want to suppress certain elements from 
being displayed.  However, it would seem that when you use the <xsl:if
test="//element/@attribute"> or 
the <xsl:when tes="//element/@attribute"> it does not recognize the
attribute or the metadata asociated with the 
attribute.  

here is my example

<xsl:template match="image">
	<xsl:choose>
		<xsl:when test="//illust/@obj.id=1">

		</xsl:when>
		<xsl:otherwise>
			<SPAN style="
				 font-size: 10pt;
				 font-style: normal;
				 font-weight: bold;
				 vertical-align: center;
				 margin-right: 3pc;
				 width: 300;
				 height: 100">
			<p>
			<IMG >
			<xsl:attribute name="SRC" >
			<xsl:value-of select="@reference"/>
			</xsl:attribute>
			</IMG>
			</p>

			<xsl:value-of select="illust"/>
			<xsl:apply-templates />
			<p></p>
			</SPAN>
		</xsl:otherwise>
	</xsl:choose>
</xsl:template>

It would seem that the /@obj.id=1 is not recognized at all because there is
no difference
when I take the /@obj.id=1 away, and or when I give place a different value
to the attribute.

How could I suppress just one graphic, and show the rest.  Any help would be
appreciated.  I have looked at the
http://www.inquiry.com/techtips//xml_pro/answer.asp?pro=xml_pro&docID=4401
and it did not help me at all.

Eddy



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.