empty text node versus empty sequence
Replies (1)
Please register to reply
Added by Anonymous over 19 years ago
Legacy ID: #3095696 Legacy Poster: marcvc (marcvc)
Michael, likely not a common scenario, I report it for completeness. text{()} seems to evaluate to an empty text node, rather than the empty sequence. For example, count(text{()}) evaluates to 1 where is should be 0. Thanks, Marc
Legacy ID: #3095780 Legacy Poster: Michael Kay (mhkay)
You're right. It's not a common scenario, but of course I have to get it right. Unfortunately the code changes are quite extensive, because the content of a text node constructor is currently evaluated using the same code as for attribute, comment, and processing instruction constructors, not to mention xsl:value-of which is the equivalent in XSLT -- all of which produce a node whose string value is "" when the content expression returns an empty sequence! Michael Kay
Please register to reply