KB Article #176402

schema import : XSD document or XML schema, what is the difference ?

Problem

-- to import a schema, File -> Import -> Map designer -> Message Description , you need to select the document source type to import (Schema / DTD / XML Description)

-- what is the difference ? which one should I choose ?

Resolution


* The difference is the following:

- XSD will not ‘import' the structure, but use the actual physical schema that will be deployed with the deployment container.
Using XSD will include validating the XML documents to the schema as it is defined, including patterns and value limitations.
As an XSD cannot be modified, this is the only way to guarantee the XML is completely valid.

- XML will ‘import' the structure and transform the schema into a business document that then can be modified and adjusted.
The actual XSD is not checked during runtime, but the XML documents are compared to the BDOC structure. Patterns and value limitations will not be validated unless they are defined manually on the business document.

As business documents do not 100% correspond to the XML (patterns) there is no 100% guarantee that the XML is actually valid.

Importing as XML also has some limits on size, as it will need a lot of memory to transform the XSD to a BDOC.

* schema control requires to activate the option "check input attrbutes" / and "check input attrbutes" at the Flow level (Main Block)

* by default, use the XSD unless you don't care about patterns and want to be able to change the structure as a BDOC