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

<xsl:for-each> not working...

Subject: <xsl:for-each> not working...
From: "John Liebermann" <ahsan_hussain@xxxxxxxxxxxxx>
Date: Fri, 15 Aug 2003 13:06:30 -0700
xsl for each not working
Thank you all for your help on the last one.

I am trying to put a heading just once in between my data which is linked to
the links on top. I have a for-each loop going to ancester::* This is what i
am doing:

		<xsl:for-each select="ancestor::*">
			<xsl:choose>
				<xsl:when test="contains(@name, 'Inputs')"></xsl:when>
				<xsl:when test="contains(@name, 'Outputs')">
					<a name="out">Output Descriptions</a>
					<xsl:if test="contains(@name, 'Outputs')"></xsl:if>
				</xsl:when>
				<xsl:when test="contains(@name, 'Settings')"></xsl:when>
				<xsl:otherwise>
					<xsl:if test="not(position()='1')">
						<xsl:value-of select="@name" />/
					</xsl:if>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:for-each>

As it is evident from the code, the Output Descriptions is printed each time
a field belongs to the Outputs. I would like this to be printed only once.
Is there a way to do that inside my for-each loop because that is very
necessary? Any hint or help would be greatly appreciated.

-John

----------------------------------------------------------------------------
----------------------------
Here is what the output looks like right now:
Output Description                                         <---------------
want this only once
NoValueRestrictions/ required
Description: None
Required: Yes
Value Restrictions: None

Output Description
<---------------------NOT REQ.
NoValueRestrictions/ optional_NoDefault
Description: None
Required: No
Default Value: None
Value Restrictions: None

Output Description
<---------------------NOT REQ.
NoValueRestrictions/ optional_withDefault
Description: None
Required: No
Default Value: This is the default value
Value Restrictions: None
 ...



 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.