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

How does xsl:if work?

Subject: How does xsl:if work?
From: "Brian Burridge" <brian_burridge@xxxxxxxxxxxxx>
Date: Fri, 02 Jun 2000 15:28:06 -0400
how does xsl work
I've read at least 10 arcticles that mention xsl:if, and they all use
the same example. Makes me think that not many of the authors understand
how to use it so they play it safe.

All the examlples use comparisons such as "not(position()=last())".
However, what I want to do is use the if to supress or alter display
based on the value of an attribute.

For example:
<xsl:if test="@team=ALL">
    <td class="th"> Team </td>
</xsl:if>

where the xml is:
<projects title="Display Projects"
xsl="/app/webdocroot/insidectm/projectutility/display_projects_xsl/default.xsl"
pcode="null" team="ALL" status="null" department="null"
group="project_number" priority="ALL" user="bburridg" >
<project>
 <number>1102</number>
 <title>This is the title</title>
 <priority>3</priority>
</project>
</projects>

So the "team" is an attribute of projects and if the team is ALL I want
to add a team column (to label each row with the team), whereas, if the
team is a specific team there is no point in putting that team on every
row, so I'll suppress that column.
--

Brian N. Burridge
Internet Architect
Ext 3515
The Internet Group - ITSS
Cox Target Media

"Until a person can say deeply and honestly, "I am what I am today
because of the choices I made yesterday," that person cannot say, "I
choose otherwise."



 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.