WebSphere Partner Gateway validates the service content of a RosettaNet message using validation maps. These validation maps define the structure of a valid message and define the cardinality, format, and valid values (enumeration) of the elements within the message. Within each PIP document flow package, WebSphere Partner Gateway supplies the validation maps as XSD files in the GuidelineMaps directory.
Because RosettaNet specifies the format of a PIP message, typically you will not need to customize the validation maps. However, if you do, see Creating PIP document flow packages for information about the steps needed to upgrade the XSD files used to validate the messages and how to create a custom PIP document flow package.
Cardinality determines the number of times a particular element can or must appear in a message. In the validation maps, the minOccurs and maxOccurs attributes determine the cardinality of the attribute as shown in the following example taken from BCG_5C4RegistrationStatusNotification_V01.02.xsd:
<xsd:element name="GeographicRegion" type="GeographicRegionType"
minOccurs="0"/>
If WebSphere Partner Gateway does not need to check the cardinality of an element, the values of the element's minOccurs and maxOccurs attributes in the validation map are "0" and "unbounded", as shown in the following example:
<xsd:element name="DesignRegistrationIdentification"
type="DesignRegistrationIdentificationType2"
minOccurs="0" maxOccurs="unbounded"/>
Format determines the arrangement or layout of data for the type of an element. In the validation maps, the type has one or more restrictions as shown in the following examples:
<xsd:simpleType name="_common_LineNumber_R"> <xsd:restriction base="xsd:string"> <xsd:minLength value="1" /> <xsd:maxLength value="6" /> </xsd:restriction> </xsd:simpleType>
All _common_LineNumber_R type elements in a message must be Strings and must be 1 to 6 characters in length.
<xsd:simpleType name="_GlobalLocationIdentifier"> <xsd:restriction base="xsd:string"> <xsd:pattern value="[0-9]{9}.{1,4}" /> </xsd:restriction> </xsd:simpleType>
All _GlobalLocationIdentifier type elements in a message must be Strings and must have nine characters of numeric data followed by one to four characters of alphanumeric data. The minimum length is therefore 10 characters and the maximum is 13.
<xsd:element name="DayOfMonth"> <xsd:simpleType> <xsd:restriction base="xsd:positiveInteger"> <xsd:totalDigits value="2" /> <xsd:minInclusive value="1" /> <xsd:maxInclusive value="31" /> </xsd:restriction> </xsd:simpleType> </xsd:element>
All _DayofMonth type elements in a message must be PositiveInteger, must have one or two characters, and have a value of 1 to 31 inclusive.
Enumeration determines the valid values for an element. In the validation maps, the type of the element has one or more enumeration restrictions as shown in the following example:
<xsd:simpleType name="_local_GlobalDesignRegistrationNotificationCode"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="Initial" /> <xsd:enumeration value="Update" /> </xsd:restriction> </xsd:simpleType>
All _local_GlobalDesignRegistrationNotificationCode type elements in a message must have only "Initial" or "Update" for their values.