Restrictions
It is possible to restrict elements and attributes in an existing content model group by using the restriction element. For either elements or attributes, it is possible to exclude optional items from the derived content model. It is also possible to restrict wildcards (any or anyAttribute) to contain values of a given type. It is also possible to further restrict facets such as minOccurs and maxOccurs to specify a narrower range than was defined in the base type.
As of XBinder version 1.2, restricted types are handled by generating a completely new type definition containing only the restricted items. In previous versions, the generated type contained only a single base element that referenced the base type.
As of XBinder 1.4, the restricted type is now included in the generated derivations type for the items. This makes it possible to successfully decode an item that referecnes the base type and uses an xsi:type attribute to select the restricted type for substitution.
The general mapping is as follows:
Copyright © Objective Systems 2002-2008 This document may be distributed in any form, electronic or otherwise, provided that it is distributed in its entirety and that the copyright and this notice are included. |
Objective Systems, Inc.55 Dowlin Forge RoadExton, Pennsylvania 19341 http://www.obj-sys.com Phone: (484) 875-9841 Toll-free: (877) 307-6855 (US only) Fax: (484) 875-9830 info@obj-sys.com |