Skip to main content

valid-xml-schema-type

Overview

This rule belongs to the xml-validation ruleset and states that:

The type attribute is used to define the data type of an element or attribute in an XML Schema document. The value of the type must either be a simple XML schema standard type e.g. string, integer, boolean etc. or a valid name (qualified/unqualified) of a simple/complex type defined in the same or an external XML schema document. If type information is not found, type string will be assumed by default when importing/transforming in APIMatic.

PropertyValue
EnabledYes
Maximum SeverityError
MessageProvided type could not be resolved.
CodeXML_V401
TypeValidation
Rule SystemSyntax
Broad CategoryXML Schema
Tagsxml preliminary checks validation type schema

Suggested Fixes

  • If you intend to use a built-in standard type name, ensure that it matches with the standard version exactly and that there are no typos. Values are compared in a case-sensitive manner.
  • If the XML schema document(s) make use of multiple namespaces, ensure that the type name is properly qualified i.e. contain a namespace prefix followed by the local type name. The format to be used is [namespace prefix]:[local name].
  • If your type name uses a qualified name, ensure that the namespace prefix it uses is pre-defined using a valid namespace value.
  • If the referenced type exists in an external XML schema ensure that the path provided for the external schema (in includes/imports) is valid and publicly accessible.
  • If the referenced type exists in an external XML schema ensure that the XML schema document contains a valid schema definition.
  • If you are trying to reference a complex type ensure that a <complexType> component exists with the provided name attribute value.
  • If you are trying to reference a simple type ensure that a <simpleType> component exists with the provided name attribute value.

For More Information