Hi,
I'm interested in counting the number of elements in the variable
$varAnalyzeStr holding analyze-string results wrapped by elements and
then output the elements within the $varAnalyzeStr in a for-each.
I've been able to count the number accurately however not output the
variable varAnalyzeStr as a series of section elements. Currently I'm
looping 15 times in the for each but no outputting any content.
What am I doing wrong and is there a better way to do this?
<xsl:variable name="varAnalyzeStr" as="node()*">
<xsl:analyze-string select="parent::node()/content/text()"
regex="Y(\d+)Y">
<xsl:matching-substring>
<xsl:element name="section">
<xsl:attribute name="href" select="regex-group(1)"/>
</xsl:element>
</xsl:matching-substring>
</xsl:analyze-string>
</xsl:variable>
<xsl:choose>
<xsl:when test="not(empty($varAnalyzeStr))">
<xsl:element name="">
<xsl:attribute name="Count" select="count($varAnalyzeStr)"/>
<xsl:for-each select="$varAnalyzeStr">
<xsl:value-of select="."/>
</xsl:for-each>
</xsl:element>
</xsl:when>
</xsl:choose>
--
Thanks Much
Alex
https://sites.google.com/a/utg.edu.gm/alex
--~------------------------------------------------------------------
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>
--~--