[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: xsl: extract the first word
I am trying to get something like (substring X 0 (position #\Space X)) i.e., the first word of the string. if there are no spaces, I want the whole of X (in that case POSITION returns NIL and I get what I want). I tried: {substring-before(normalize-space(.),' ')} unfortunately, this returns "" (empty string) when there is no spaces in the string. {replace(normalize-space(.),' *','')} xmlXPathCompOpEval: function replace not found XPath error : Unregistered function xmlXPathCompiledEval: 2 object left on the stack I use xsltproc (v2, comes with cygwin). thanks! -- Sam Steingold (http://www.podval.org/~sds) running w2k <http://www.iris.org.il> <http://www.jihadwatch.org/> <http://www.savegushkatif.org> <http://ffii.org/> <http://www.memri.org/> What was the best thing before sliced bread?
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]