[Home] [By Thread] [By Date] [Recent Entries]
Yves Forkl wrote:
will return true if no child has a @my_attribute that returns false. I.e., if the value were empty, but available, it would return false.
will return true if no child has a sequence of nodes @my_attribute (alsways one or zero attribute nodes) that when normalized returns false. That is in this scenario effectively the same as above, I believe.
'every' returns a boolean. You an safely negate it, so this will work. However, note also: The expression: empty(*/@my_attribute) will return true() when there is no child that has an attribute @my_attribute (i.e., in other words, it will return true when the expression returns an empty sequence). The expression: every $child in * satisfies $child/@my_attribute may not return the expected answer when there are no childs at all: it will return true. This is illustrated if you compare the behavior in the following XPath equivalent: count(*/@my_attribute) = count(*)
|

Cart



