Trading Networks 10.7 | Administering and Monitoring B2B Transactions | Service Development Help | Working with Schemas | About Editing Simple Type Definitions
 
About Editing Simple Type Definitions
 
Editing a Simple Type Definition
You can modify a simple type definition in an IS schema without editing the source XML schema definition. You edit a simple type by adding or changing the value of one or more constraining facets applied to the simple type. For example, you can modify a simple type by adding an enumerated value, a pattern constraint, or changing the length constraint. Editing the simple type through Designer is an alternative to editing the source XML schema definition and regenerating the IS schema.
You can edit any of the globally defined simple types (those that appear under the SIMPLE TYPES heading) or anonymous simple types (those defined as part of an element or attribute declaration.) A named simple type that appears as a child of an element or attribute in the Schema browser cannot be edited. (These simple types are global simple types used to define the element or attribute they appear under.) The following illustration identifies the simple type definitions that you can and cannot edit.
Editable simple type definitions in an IS schema
You can edit any of the constraining facet values that appear in the Component Details when you select an editable simple type definition in the Schema browser. The constraining facets displayed in the Component Details depend on the primitive type from which the simple type was derived. For example, if the simple type definition is derived from string, the Component Details displays the enumeration, length, minLength, maxLength, pattern, and whiteSpace facets. The Component Details only displays constraining facet values set in the simple type definition. It does not display constraining facet values the simple type definition inherited from the simple types from which it was derived.
You can view the constraining facet values set in the type definitions from which a simple type was derived by clicking Base Constraints. Base constraints are the constraining facet values set in all the type definitions from which a simple type is derived—from the primitive type to the immediate parent type. These constraint values represent the cumulative facet values for the simple type.
When you edit the constraining facets for a simple type definition, you can only make the constraining facets more restrictive. The applied constraining facets cannot become less restrictive. For example, if the length value is applied to the simple type, the maxLength or minLength values cannot be set because the maxLength and minLength facets are less restrictive than length.
Tip:
You can create a custom simple type to apply to a field as a content type constraint. For information about creating a custom simple type, see Customizing a String Content Type. For information about applying constraints to fields, see Applying Constraints to a Variable.