Scope, Inheritance, and Precedence
40
U
SING
JAXB
<jxb:bindings node="//xs:complexType[@name='USAddress']">
In such cases, the customization is applied to the node by the binding
compiler as if the declaration was embedded inline in the node's
<xs:appinfo>
element.
To summarize these rules, the external binding element
<jxb:bindings>
is only
recognized for processing by a JAXB binding compiler in three cases:
· When its parent is an
<xs:appinfo>
element
· When it is an ancestor of another
<jxb:bindings>
element
· When it is root element of a document--an XML document that has a
<jxb:bindings>
element as its root is referred to as an external binding
declaration file
Scope, Inheritance, and Precedence
Figure 31 illustrates the inheritance and precedence of customization declara-
tions. Specifically, declarations towards the top of the pyramid inherit and super-
sede declarations below them. For example, Component declarations inherit
from and supersede Definition declarations; Definition declarations inherit and
supersede Schema declarations; and Schema declarations inherit and supersede
Global declarations.