#202 Unknown type annotation 0

closed
nobody
5
2012-10-08
2004-03-31
Michael Kay
No

Saxon can crash with the message "unknown type
annotation 0 in data model". The cause is in
Navigator.java, method copy(), which has a call to
out.startElement() and a call to out.attribute()
supplying a second argument (typeCode) of zero, which
should be -1.

It's a little difficult to explain exactly what
circumstances cause the error. This copy routine is
used in three situations: where the source node is a
DOM wrapper, a JDOM wrapper, or an Orphan node
(typically a parentless attribute). Parentless
attributes are most likely to arise from computed
attribute constructors in XQuery. The error only cause
a crash if there is a subsequent attempt to obtain the
typed value of the copied node.

Source code fixed, test case added (qxmp129).

Discussion

  • Michael Kay
    Michael Kay
    2004-06-24

    Logged In: YES
    user_id=251681

    Reopened: only one occurrence of this problem was fixed in
    7.9.1, and a number of other occurrences have been found in
    8.0. Most commonly it occurs when a DOMSource is used, it
    has also been reported in respect of a tree constructed
    using the sql:query extension.