So I have this .inc file which has a set of <li> elements like
<li class="closed"><a title="x" href="x.html">x</a></li>
<li class="closed"><a title="y" href="y.html">y</a></li>
<li class="closed"><a title="z" href="a.html">z</a></li>
I’m able to get each value using the following XSL code:
<xsl:variable name="vText" select="unparsed-text('/abc/abcd/leftnav.inc')"/>
<xsl:variable name="vExtracted" as="xs:token*">
<xsl:analyze-string select="$vText" regex=">([^<]*)</a>" flags="m">
<xsl:matching-substring>
<xsl:value-of select="regex-group(1)"/>
</xsl:matching-substring>
</xsl:analyze-string>
</xsl:variable>
So now if I want to print each value I use something like:
<xsl:value-of select="$vExtracted[1]"/><br/>
<xsl:value-of select="$vExtracted[2]"/><br/>
<xsl:value-of select="$vExtracted[3]"/><br/>
.
.
and so on which outputs like:
x
y
z
My question is how can I just loop through $vExtracted and print all the values?
Use: