|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: strange problem with string-replace
> But when I want to remove > all (line feed) or   (space) I have a > java.lang.StackOverFlowError, both with xt and saxon (win32 > executables) The invisible whitespace demon strikes again. In your statement <xsl:variable name="from">&return;</xsl:variable> the entity &return; expands to whitespace, so the XSLT processor strips it from the tree. David Carlisle's code (shame on him!) recurses infinitely if the value of "from" is an empty string. (Actually the spec doesn't define the behaviour of things like contain() very clearly for null strings, but it seems xt and Saxon have both implemented the same rules). Rewrite it as: <xsl:variable name="from" select="'&return;'"/> and all will be well. This is better anyway: if you use the content of xsl:variable to define a string value, the processor will have to go through the motions of converting a result tree fragment to a string every time the value is used. Mike Kay XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








