What are some constraints techniques for widely reused objects in IEPD?

This cannot be done using just a constraint schema, and is a common problem for widely reused objects such as address and person where a user wants a different subset of object properties depending on a particular use.
However, the user's needs CAN be met using xsd:restriction in an extension schema.  The use of xsd:restriction is permitted by the NDR 1.3 in extension schemas.  Here is how it would be accomplished for a particular property:

For example in a constraint schema, how does one go about constraining nc:StructuredAddressType as follows...

a.     When used as...
nc:ContactInformation/[nc:ContactMeans]/nc:ContactMailingAddress/[nc:AddressRepresentation]/nc:StructuredAddress

...it should contain only:
nc:AddressDeliveryPointText
nc:LocationCityName
nc:LocationStateName
nc:LocationPostalCode

b.     But when used as...
nc:Incident/nc:IncidentLocation/nc:LocationAddress/[nc:AddressRepresentation]/nc:StructuredAddress

...it should contain only:
nc:LocationCityName
nc:LocationCountyName

The attached word document contains a detailed step-by-step procedure on how to do this.

 

Documents