1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
==========================
XSD element research notes
==========================
:Authors: Jurko Gospodneti
:Date: 2014-06-29
Global/local elements
---------------------
XSD schema elements are separated into two disjunct groups:
_`global`
top-level elements and non-top-level reference elements (such references may
only reference top-level elements, whether from the same or another schema)
_`local`
non-top-level non-reference elements
_`Qualified`/_`unqualified` elements
------------------------------------
An XSD element is considered qualified if and only if one of the following
holds:
* it is `global`_
* its ``form`` attribute is set to ``qualified``
* its ``form`` attribute is unset and its schema's ``elementFormDefault``
attribute is set to ``qualified``
**suds implementation note:** The only allowed ``form`` & ``elementFormDefault``
attribute values are ``qualified`` & ``unqualified`` but ``suds`` interprets any
value other than ``qualified`` as ``unqualified``.
Element's _`target namespace`
-----------------------------
An XSD element may have a `target namespace`_ assigned.
If an XSD element has a `target namespace`_ assigned then an XML element
corresponding to this XSD element must belong to that namespace.
If an XSD element does not have a `target namespace`_ assigned then an XML
element corresponding to this XSD element must not belong to any namespace.
Whether an XSD element has a `target namespace`_ assigned depends on whether it
is `qualified`_ or not, whether it is a reference and on its or its referenced
element schema's ``targetNamespace`` attribute:
* an `unqualified`_ element never has a `target namespace`_ assigned
* a non-reference `qualified`_ element collects its `target namespace`_ from its
schema's non-empty ``targetNamespace`` attribute or has no `target namespace`_
if its schema does not have a non-empty ``targetNamespace`` attribute value
specified
* a reference element (such elements are always `qualified`_) collects its
`target namespace`_ in the same way but used its referenced element schema
instead of its own
|