is not supported with Tamino 3.1.1, 3.1.2 and 4.1.1!
You can only restrict built-in-types (http://www.w3.org/TR/xmlschema-2/#built-in-datatypes).
User-defined types (complexType, simpleType, simpleType with attributes) can only be addressed via the type-attribute.
Unfortunately there is no workaround for your construct, even not with Tamino 4.1.1, since you want to create an element definition, that has an attribute and additionally its type is restricted to the values of the enumeration. Therefore you would need to restrict user-defined types.
One solution might be a little change of your design:
Drop the attribute “mode” and create another element “mode” instead of. Then you can restrict the component element. Build a pair of (component, mode) elements using a sequence, e.g.
<xs:schema xmlns:tsd = "http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition" xmlns:xs = "http://www.w3.org/2001/XMLSchema">
<xs:simpleType name = "componentType">
<xs:restriction base = "xs:string">
<xs:enumeration value = "GeneralUserInformation"></xs:enumeration>
<xs:enumeration value = "LogicalIdentifiers"></xs:enumeration>
<xs:enumeration value = "GeneralSubscribe Information"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:element name = "OperatorAccessList">
<xs:complexType>
<xs:sequence minOccurs = "0" maxOccurs = "unbounded">
<xs:element name = "component" type = "componentType"></xs:element>
<xs:element name = "mode" type = "xs:string"></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
This one should work with Tamino 4.1.1.
If you work with Tamino 3.1.1 or 3.1.2, user defined types are not supported at all.
Please provide more information next time: Version of Tamino Server, Tamino-X-Tools.
Best regards,
Peter
[This message was edited by Admin on 12 Nov 2002 at 12:51.]
#webMethods#Tamino#API-Management