xsl-list
[Top] [All Lists]

Re: need help outputing summary of head elements

2005-09-19 23:48:59
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> &#8211; </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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--