I have an XML document and associated schema that defines several attributes as having the xs:boolean
type. The lexical values for xs:boolean
are true
, false
, 1
, and 0
, so it seems that to correctly select attributes with a particular boolean value I'd have to write something like:
@attribute='true' or @attribute='1'
or
@attribute='false' or @attribute='0'
This seems verbose.
You might expect something like boolean(@attribute)
to work, but the boolean
function has different semantics.
Is there a better way? Is this something that a schema-aware processor would help with?