This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fwd: Over/under trimming of whitespace


David,

Thank you for helping. I may be misinterpreting the XPATH spec, but it

says "The normalize-space function returns the argument string with 
whitespace normalized by stripping leading and trailing whitespace 
and replacing sequences of whitespace characters by a single space."

I was expecting a single space and not an empty string - it definitely

did this with Saxon, and I suspect that it does with Xalan but with
Xalan 
I did not look at the intermediate result of my XHTML to FO
translation. 
In this case it would be nice to be able to test for some whitespace as

opposed to an empty string.

Thanks,

David Morris 

>>> davidc@nag.co.uk 04/25/02 04:24PM >>>

: I have a couple of problems here, I thought that normalize-space() 
: should return a single character if any whitespace exists.
why?:-)
As you spotted it returns empty string but you only need a minor tweak
to your test
test="normalize-space()='' and .!=''"
is true just if the string value of the current node is non zero white
space.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]