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 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:09 GMT