|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Starting loop at another node
My apologies for not reading the initial mail correctly and clogging up everyone's inboxes. Looking at it again the problem is because you are checking the position of the current node, rather than selecting the children nodes. In this context the current node is the Whatever node. As the position of this node is always 1 the test condition will never be true. You need to select the children of the Whatever node. This XSL will probably produce the result you require: <xsl:for-each select="Whatever/*[position()>3 and text()]"> <h3><font color="#00007f"><i><xsl:value-of select="name()"/></i></font></h3> <p><font color="#008000"><xsl:value-of select="."/></font></p> </xsl:for-each> > -----Original Message----- > From: Tanzila Mohammad [mailto:tmohammad@xxxxxxxxxxxxxxxxxxxx] > Sent: Tuesday, April 17, 2001 4:34 PM > To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx > Subject: Starting loop at another node > > > I am trying to start the loop at node 4 (child 4) of the > 'whatever' parent: > <Whatever> <child1> > <child2> > <child3> > <child4> > <child5> > <child6> > .... > </Whatever> > > I am using the following > > <xsl:for-each select="Whatever"> > <xsl:choose> > <xsl:when test="position()>3"> <!-- Here is the > problem --> > <xsl:for-each select="*[text()]"> <!--start of process--> > <h3><font color="#00007f"><i><xsl:value-of > select="name()"/></i></font></h3> > <p><font color="#008000"><xsl:value-of > select="."/></font></p> > </xsl:for-each> <!--end of process--> > </xsl:when> > </xsl:choose> > </xsl:for-each> > > At the moment the display is not doing as I wish. > > Thanks. > > Tanz > > > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








