RE: [xsl] newbie question about strings and XPath expressions

Subject: RE: [xsl] newbie question about strings and XPath expressions
From: Jarno.Elovirta@xxxxxxxxx
Date: Wed, 20 Aug 2003 09:29:44 +0300
Hi,

> Hello Jarno, thank you, it worked fine.
> I'm actually trying to extract the items of an enumeration in 
> an xhtml file to present 
> them as individual item elements in the xml output. Is there 
> a way of iterating through 
> this input text looking for the enumeration items? I mean, 
> could I increment the number 
> in the starts-with expression somehow?

By writing a recursive template you can increment the number used in the starts-with test. But couldn't you just test if the text node start with a number, e.g.

not(string(number(substring-before(., '.'))) = 'NaN')

Cheers,

Jarno - Hocico: Ruptura

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread