DevOps Edition for Continuous Integration 10.5 | Service Development Help | Working with Document Types | Creating an IS Document Type | Generating Fields for Substitution Groups
 
Generating Fields for Substitution Groups
Integration Server processes substitution group elements in one of two ways, depending on the value of the watt.core.schema.generateSubstitutionGroups property:
*When this property is set to true, the schema processor imports all substitution group members (a non-abstract head element and substitutable elements) as optional fields, even though they are defined as required elements in the XML Schema definition.
Note: Because all the substitution group members are imported as optional, during validation, Integration Server might consider some documents to be valid even though the documents are actually invalid. For example, suppose the original XML schema definition required the head element or one of the member elements to be present. If none of the substitution group elements are present in the instance document, Integration Server considers the document to be valid because the corresponding fields are optional in resulting IS document type. Additionally, if the instance document contains more than one member of the substitution group, Integration Server considers the document to be valid because the corresponding fields are optional.
*When this property is set to false, the resulting document type contains a field that corresponds to the head element in the substitution group, but does not contain any elements for members of the substitution group. This is the default.
When generating fields for a substitution group, Integration Server exhibits the following behavior:
*If the head element is declared as abstract, Integration Server does not include that element in the IS document type.
*Normally, when Integration Server creates a document type for a content model that contains multiple occurrences of an element, Integration Server aggregates the repeated fields into a single array. For example, if Integration Server encounters two elements named "myElement", Integration Servercollects them into a single array named "myElement". However, when Integration Server creates a document type for a substitution group, if the same element is included in the substitution group more than once via two different substitution group members, Integration Server does not aggregate the elements into an array.
*Integration Server cannot create an IS document type from an XML Schema definition that contains a substitution group with a recursive reference to another substitution group. For example, if a member of the substitution group contains a reference to the head element, Integration Server enters a loop which eventually results in a stack overflow error.

Copyright © 2017-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.