Hi, wondering if anybody could help me figure how to. in schema,
restrict the list of tokens I may have as an attribute value. For
example
<xs:complexTy pe name="customer" >
<xs:sequence>
<xs:element name="firstname " type="xs:string "/>
</xs:sequence>
<xs:attribute name="life" use="optional">
<xs:simpleTyp e>
<xs:restricti on base="xs:NMTOKE N">
<xs:enumerati on value="session"/>
<xs:enumerati on value="request"/>
<xs:enumerati on value="context"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
I would like "Norwegian_cust omer" to extend from customer but to allow
for the "life" attribute only the "session" value. This is what I am
doing so far but is not correct.
<xs:complexTy pe name="Norwegian _customer">
<xs:complexCont ent>
<xs:restricti on base="pf:custom er">
<xs:sequence>
<xs:element name="firstname " type="xs:string "/>
</xs:sequence>
<xs:attribute name="life" use="optional">
<xs:simpleTyp e>
<xs:restricti on base="xs:NMTOKE N">
<xs:enumerati on value="session"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:restriction>
</xs:complexConte nt>
</xs:complexType>
Thanks in advance
restrict the list of tokens I may have as an attribute value. For
example
<xs:complexTy pe name="customer" >
<xs:sequence>
<xs:element name="firstname " type="xs:string "/>
</xs:sequence>
<xs:attribute name="life" use="optional">
<xs:simpleTyp e>
<xs:restricti on base="xs:NMTOKE N">
<xs:enumerati on value="session"/>
<xs:enumerati on value="request"/>
<xs:enumerati on value="context"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
I would like "Norwegian_cust omer" to extend from customer but to allow
for the "life" attribute only the "session" value. This is what I am
doing so far but is not correct.
<xs:complexTy pe name="Norwegian _customer">
<xs:complexCont ent>
<xs:restricti on base="pf:custom er">
<xs:sequence>
<xs:element name="firstname " type="xs:string "/>
</xs:sequence>
<xs:attribute name="life" use="optional">
<xs:simpleTyp e>
<xs:restricti on base="xs:NMTOKE N">
<xs:enumerati on value="session"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:restriction>
</xs:complexConte nt>
</xs:complexType>
Thanks in advance
Comment