I'm trying to construct an xquery that will return the count for the number attributes found that have a value of x.
This is part of an SQL query and these counts will fill one of the columns returned (that part I can figure out, it's the actual xquery to get the count I haven't figured out yet.)
For example, if I have <element elementattribute=1>...</element>
, how would I count all the @elementattributes
that equal 1 for a given chunk of xml?