|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: need help outputing summary of head elements
i finally got what i wanted :D (yippeee!) what i did was get all data of the head element then tokenized it by spaces and tested if the first token is in the $strRoman. then i iterate all through all the heads that matches that parameter. :D <xsl:template name="InsertSummary"> <xsl:param name="ParentInfo"/> <xsl:element name="summary"> <xsl:variable name="x" select="$ParentInfo//div/head[subsequence(tokenize(data(.),' '),1,1) = $strRoman]"/> <xsl:for-each select="$x"> <xsl:value-of select="."/> <xsl:if test="position() != count($x)"> <xsl:text> – </xsl:text> </xsl:if> </xsl:for-each> </xsl:element> </xsl:template> i still did not use the last() function cause for some reason it always return '1' and not the position of the last node, thats why i'm using the count() function to determine the postion of the last node. again thanks for all the help! :D UlyLee __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
|
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








