|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Unanticipated Results from text()
> Loss of whitespace isn't what concerns me, it's the loss of the > non-whitespace that has me puzzled. it's loss of whitespace that is causing your problem though, as once you have lost the white space the numbering of the other text nodes is changed accordingly. If you have <x> <y> abc </y> test </x> and with x as the current node go normalize-space(text()) then text() selects the node set of text child nodes, which in a conforming system is a set of two nodes with values "(newline)" and "(newline)test(newline)" respectively. normalize-space() requires a string input so (in xpath 1) silently discards all but the first node in document order, and takes teh string value of that node. So in a conforming system, normalize-space gets passed "(newline)" and returns "" If however MSXML has thrown away the white space already then the input is essentially this: <x><y> abc </y> test </x> so now text() just selects one text node child, with value "(newline)test(newline)" and the string value of that gets passed to normalize-space which then returns "test". David
|
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
|






