Sometimes, it is desirable to bind a class into different schemas
with different namespaces or bind a class hierarchy into a specific
target namespace and some of the classes into a different namespace
the value of which depends on the root element's namespace.
XmlElement's namespace attribute cannot be used in a case like that.
What we need is to specify a prefix instead of the namespace itself
and define the namespace to prefix mapping in the JBossXmlSchema annotation.
This annotation is used to reference a namespace by its prefix.
True means the type of the property (including its child elements, their types and model groups recursively)
will be bound to the namespace specified by the prefix.
If the prefix mapping is not found and the value is true
then the target schema namespace will be used, if the value is
false then an exception will be thrown.
If the prefix mapping is not found and the value is true
then the target schema namespace will be used, if the value is
false then an exception will be thrown.
Returns:
Default:
false
applyToComponentQName
public abstract boolean applyToComponentQName
True means the element or model group the property is bound to will be bound to the namespace specified by the prefix.
False means the element or model group will be in the schema's target namespace.
Returns:
Default:
true
applyToComponentContent
public abstract boolean applyToComponentContent
True means the type of the property (including its child elements, their types and model groups recursively)
will be bound to the namespace specified by the prefix.
False means the type of the property (including its child elements, their types and model groups recursively)
will be bound to the schema's target namespace.