|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: error:XSLT Stylesheet (possibly) contains a recur
Hi Vaduvoiu
Your test is always false, unless the text itself is only a space. Change it to: <xsl:when test="substring($text,$length-1, 1)=' ' "> and you should be fine. Note that in XSLT 2.0 you can do this with replace($text, ' [^ ]*', ''), which is a little bit shorter than your 14 lines, but you didn't mention whether you could use XSLT 2.0 If the strings get quite large, consider optimizing your template (if in XSLT 1.0, I mean) with substring-before. Cheers, -- Abel Braaksma Vaduvoiu Tiberiu wrote: Hi, i'm trying to do the following thing: I need to display a string until the last occurance of the space character.So if I would have "this is a news" i would need to display "this is a". I am using xslt1.0 and I tried doing the following:
|
Back To School Sale!Save 30% off all Stylus Studio 2008 Products when you purchase from our Online Shop. 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
|






