xsl-list
[Top] [All Lists]

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

2003-07-15 13:08:41
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



<Prev in Thread] Current Thread [Next in Thread>