XSD

www.altova.com Expand/Collapse All Print this Topic Previous Page Up One Level Next page

Home >  Command Line Interface (CLI) > Options >

XSD

Click to expand/collapseassessment-mode

--assessment-mode = lax|strict

Specifies the schema-validity assessment mode as defined in the XSD specifications. Default value is strict. The XML instance document will be validated according to the mode specified with this option.

 

Click to expand/collapsenamespaces

--namespaces = true|false

Enables namespace-aware processing. This is useful for checking the XML instance for errors due to incorrect namespaces. Default value is false.

Note:   Boolean option values are set to true if the option is specified without a value.

 

Click to expand/collapseschema-imports

--schema-imports = load-by-schemalocation | load-preferring-schemalocation | load-by-namespace | load-combining-both | license-namespace-only

Specifies the behaviour of xs:import elements, each of which has an optional namespace attribute and an optional schemaLocation attribute: <import namespace="someNS" schemaLocation="someURL">. The option specifies whether to load a schema document or just license a namespace, and, if a schema document is to be loaded, which information should be used to find it. Default: load-preferring-schemalocation.

The behavior is as follows:

 

load-by-schemalocation: The value of the schemaLocation attribute is used to locate the schema, taking account of catalog mappings. If the namespace attribute is present, the namespace is imported (licensed).
load-preferring-schemalocation: If the schemaLocation attribute is present, it is used, taking account of catalog mappings. If no schemaLocation attribute is present, then the value of the namespace attribute is used via a catalog mapping. This is the default value.
load-by-namespace: The value of the namespace attribute is used to locate the schema via a catalog mapping.
load-combining-both: If either the namespace or schemaLocation attribute has a catalog mapping, then the mapping is used. If both have catalog mappings, then the value of the --schema-mapping option (XML/XSD option) decides which mapping is used. If no catalog mapping is present, the schemaLocation attribute is used.
license-namespace-only: The namespace is imported. No schema document is imported.

 

Click to expand/collapseschemalocation-hints

--schemalocation-hints = load-by-schemalocation | load-by-namespace | load-combining-both | ignore

Specifies the behavior of the xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes: Whether to load a schema document, and, if yes, which information should be used to find it. Default: load-by-schemalocation.

 

The load-by-schemalocation value uses the URL of the schema location in the xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes in XML instance documents. This is the default value.
The load-by-namespace value takes the namespace part of xsi:schemaLocation and an empty string in the case of xsi:noNamespaceSchemaLocation and locates the schema via a catalog mapping.
If load-combining-both is used and if either the namespace part or the URL part has a catalog mapping, then the catalog mapping is used. If both have catalog mappings, then the value of the --schema-mapping option (XML/XSD option) decides which mapping is used. If neither the namespace nor URL has a catalog mapping, the URL is used.
If the option's value is ignore, then the xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes are both ignored.

 

Click to expand/collapseschema-mapping

--schema-mapping = prefer-schemalocation | prefer-namespace

If  schema location and  namespace are both used to find a  schema document, specifies which  of them should  be preferred during catalog lookup. (If either the --schemalocation-hints or the --schema-imports option has a value of load-combining-both, and if the namespace and URL parts involved both have catalog mappings, then the value of this option specifies which of the two mappings to use (namespace mapping or URL mapping; the prefer-schemalocation value refers to the URL mapping).) Default is prefer-schemalocation.

 

Click to expand/collapsexsd-version

--xsd-version = 1.0|1.1|detect

Specifies the W3C Schema Definition Language (XSD) version to use. Default is 1.0. This option can also be useful to find out in what ways a schema which is 1.0-compatible is not 1.1-compatible. The detect option is an Altova-specific feature. It enables the version of the XML Schema document (1.0 or 1.1) to be detected by reading the value of the vc:minVersion attribute of the document's <xs:schema> element. If the value of the @vc:minVersion attribute is 1.1, the schema is detected as being version 1.1. For any other value, or if the @vc:minVersion attribute is absent, the schema is detected as being version 1.0.

 

 


© 2019 Altova GmbH