Hi David On Tue 2004-11-23 David Carlisle wrote: [...] > In this case you don't need non capturing groups, you can just grab all > potential keywords (eg [a-z]+) in the analyze-string, then test to see > what you have before deciding whether to add the keyword markup, eg > changing your code to > <xsl:template match="programlisting[@role='pseudocode']/text()"> > <xsl:analyze-string select="." regex="[a-z]+"> > <xsl:matching-substring> > <xsl:choose> > <xsl:when test=". = ('while','true','if','else','end')"> > <span class="keyword"> [...] Thanks, I'll see how far that gets me (there are more complex cases, where non-capturing groups probably would be handy). Tobi -- to bi as re ifReceived on Tuesday, 23 November 2004 16:38:17 UTC
This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:02 UTC