<schemaBindings> Declaration

The customization values in <schemaBindings> binding declarations have schema scope. These apply to all elements within the referenced XML schema document.

Usage

    <schemaBindings namespace | schemaLocation=”xs:anyURI”>
           [<prefix>xs:token</prefix>]
           [<sourceFile>xs:anyURI</sourceFile>]
           [<nameXmlTransform>. . .</nameXmlTransform>]
           [<doubleFormat/>]
           [<decimalFormat/>]
           [<floatFormat/>]
           [<nodeBindings>. . .<nodeBindings>]
           [<typemap>. . .</typemap>]
           ...
    </schemaBindings>

The following attributes are defined for <schemaBindings>:

namespace: A URI reference to a schema’s target namespace. The processor will look at the target namespace in all of the schemas currently being compiled for a match with the given namespace. When an XSD document without a targetNamespace is included into an XSD document with a targetNamespace, it takes on the including document's targetNamespace. This fact is taken into account.
schemaLocation: URL as it is used in <xsd:import> or <xsd:include> statements. When this alternative is used, <sourceFile> should be provided, to map the schema URL to an actual schema file. No other child elements should be present. To specify other options, use an <schemaBindings> element with a namespace attribute. XBinder does not have the capability to automatically reference schemas remotely; therefore, any imported or included schemas must have been downloaded in advance and be present on the user’s computer.

The following customization values are defined in schema scope:

prefix: This is used to specify a prefix that is prepended to all XML names, including type names and global element names, to form C#Java type and variable names. It should be a legal C#/Java identifier.
sourceFile: The actual schema file path. XBinder does not have the capability to automatically reference schemas remotely; therefore, any imported or included schemas must have been downloaded in advance and be present on the user’s computer. This element is used to map a schema URL to a file on the local system.
nameXmlTransform: This is used to perform more accurate XML names transformation than prefix allows. See the section called “Advanced XML Names Transformation” for further details.
doubleFormat: This specifies a schema-level format for encoding of values of "double" type. See the section called “XML Numeric Values Format Specification”.
decimalFormat: This specifies a schema-level format for encoding of values of "decimal" type. See the section called “XML Numeric Values Format Specification”.
floatFormat: This specifies a schema-level format for encoding of values of "float" type. See the section called “XML Numeric Values Format Specification”.
nodeBindings: Node scope binding declarations (see the section called “<nodeBindings> Declaration”). This element can be specified multiple times, but only once per definition.
typemap: This specifies a schema-level mapping of a specific XSD type to a C#/Java type (see the section called “ <typemap> Declaration). It can be specified multiple times. In each typemap declaration, a space-separated list of XSD types can be mapped to one C#/Java type.