Working within MarkLogic, I just got bitten by a server error caused by lexically invalid @xml:id in the input data. Boiled down, this was the offending query:

let $in := <input xml:id="-ptr"/>
return element out {
  attribute id { $in/@xml:id }
}

MarkLogic complains: XDMP-LEXVAL: xs:ID("-ptr") -- Invalid lexical value "-ptr"

So it is obviously trying to cast '-ptr' as xs:ID and failing. But I
notice that Saxon doesn't throw an error in this case. Either processor
is happy if I wrap string() around $in/@xml:id.

I'm just wondering if this is an implementation-dependent matter, or
what the specs might say about such a case.

David S.

--
David Sewell, Editorial and Technical Manager
ROTUNDA, The University of Virginia Press
PO Box 400314, Charlottesville, VA 22904-4314 USA
Email: [email protected]   Tel: +1 434 924 9973
Web: http://rotunda.upress.virginia.edu/
_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to