Hi,

We're experiencing some strange behaviour with Schema types (MarkLogic 5.0-3.1, 
Linux & MacOS X).

This manifests itself as a failure to enforce or correctly apply simple 
data-types, and differs between databases loaded with exactly the same schema 
and documents; all the schema's validate and are present.

e.g. in one database, where Schemas appear to be working as expected, the 
following correctly throws a XDMP-NONMIXEDCOMPLEXCONT exception:

fn:data(element r:RaceRef { element r:UUIDRef { 
'11111111-1111-1111-1111-111111111111'} })

this occurs because RaceRef is an xsi:choice and may contain either the 
simpleType element UUIDRef, or a complexType element containing, er, mixed 
complex content!

On another database, where Schemas seem to be broken, this passes without 
exception, which is troublesome not least of all because it differs, apparently 
randomly, across servers, and can lead to developers being fooled into writing 
code that doesn't actually work when deployed.

Yesterday, we had an even more worrying problem, where ML seemed to actually 
get confused about the simpleType of an element, giving us a XDMP- LEXVAL for 
the cast of an element to an xs:dateTime, even when the format was actually 
correct; the database seemed to think the type was another, unrelated schema 
type.

I've solved these problems temporarily by either clearing the Schemas database 
and re-loading it, or by re-indexing the Schemas database, although neither is 
a reliable fix, and re-loading the Schema's database during a deployment may 
end up breaking it again.

Is anyone aware of any circumstances in which this behaviour may occur? The 
servers are not resource challenged, and the Schemas database is using the 
out-of-the-box configuration.


Thanks

Ellis.

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to