[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: replace() and efficiency: troff-to-unicode convers
> If I understood correctly, your suggestion was along the > lines of: yes although I misread your regex the first time,and in my first reply everything is double quoted \\\\ instead of \\ It think th esecond version (using a key) actually works ad advertised if you just slightly fix the regex from regex=".|\\\*?\(..|\\\*\(K\\\(wi"> to regex="[a-zA-Z&"~]|\\\*?\(..|\\\*\(K\\\(wi"> > There are two matches here: \(?s and \(?c . When my <xsl:choose> finds > the first match (it's the first <xsl:when> within the <xsl:choose>), > doesn't it just replace all instances of \(?s and then not read the rest > of the <xsl:when> lines? That is, won't it fail to find the subsequent > \(?c ? No each xsl:choose only executes one xsl:when but it will be called multiple times. the string is first split up into a sequence of substrings that match or dont and then xsl:analyze-string iterates along that list much liek xsl:for-each with . beimg the matching (or not) substring at each iteration, and the matching or non matching part being taken at each step. run the code i posted (or as ammended above) and you'll see what I mean... David
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|