Project

Profile

Help

white space only attributes 8.6.1 versus 8.7

Added by Anonymous over 18 years ago

Legacy ID: #3610030 Legacy Poster: marcvc (marcvc)

Michael, consider the following foo.xml file: <a><b></b><b><c> </c></b></a> And the following query: for $b in doc("foo.xml")/a/b return <e a="{$b/c}"/> With Saxon 8.6.1 I get: <e a=""/> <e a=" "/> With Saxon 8.7 I get: <e a=""/> <e a=""/> I'm not sure I can explain this difference. Do I overlook something? Thanks, Marc


Replies (3)

Please register to reply

RE: white space only attributes 8.6.1 versus 8.7 - Added by Anonymous over 18 years ago

Legacy ID: #3610035 Legacy Poster: marcvc (marcvc)

I can add that the following query: declare boundary-space preserve; let $v := <a><b></b><b><c> </c></b></a> for $b in $v/b return <e a="{$b/c}"/> Behaves the same for both 8.6.1 and 8.7. As expected I get: <e a=""/> <e a=" "/> Could it be that with the original query something is going wrong with whitespace-only text nodes which are in 8.7 represented in a compressed form? Thanks, Marc

RE: white space only attributes 8.6.1 versus - Added by Anonymous over 18 years ago

Legacy ID: #3610768 Legacy Poster: Michael Kay (mhkay)

This one is proving quite troublesome to track down. It doesn't happen with the .NET product; and although I reproduced it when I started running it under the debugger earlier today, the bug has now magically disappeared from my development environment without my apparently changing anything. I will keep investigating, but it could prove elusive.

RE: white space only attributes 8.6.1 versus - Added by Anonymous over 18 years ago

Legacy ID: #3613168 Legacy Poster: marcvc (marcvc)

Mike, I noticed in TinyTree#getUntypedAtomicValue() two code paths where only Type.TEXT nodes are considered. I have the impression that adding the WHITESPACE_TEXT case to those looks like an improvement? I hope this helps, Marc

    (1-3/3)

    Please register to reply