Hi again...
Am 25.09.2010 19:15, schrieb Godmar Back:
declare variable $metadata as xs:anyAtomicType := doc('libx2_meta')/metadata;
As you are querying the *element* metadata, the result can't be atomic (see [1]). Seems like BaseX 6.2.3 didn't do enough type checks so that could slip through.
declare variable $metadata as node() := ...
or just
declare variable $metadata := ...
would also du what you want.
On a related note, declaring a function "as xs:anyAtomicType()*" behaves differently in 6.2.7 than in 6.2.3. I suppose the correct semantics for this is to cast the result to an anyAtomicType; 6.2.3 did not do that but 6.2.7 does.
Sounds plausible, but I'd have to read the specs to be sure...
Cheers Leo __________ [1] http://www.w3.org/TR/xpath-datamodel/#types-hierarchy