RE: schema arrangement or architecture

> My ideal schema has all its types defined globally (e.g., no
> anonymous types), and all its elements and attributes --
> locally, except for the elements that are valid document roots.

XQuery currently allows you to validate against a global element declaration
but not against a type. With schema-aware XSLT and XQuery you may often want
to validate document fragments. So I'm in favour of using global element
declarations almost everywhere. By contrast, I don't think an anonymous type
does much harm, because it's a completely undisruptive change to promote it
subsequently to a named type. I tend to make all my simple types global,
because they are very often reused, but I often keep complex types local.

Michael Kay
http://www.saxonica.com/

Received on Tuesday, 3 June 2008 08:01:04 UTC