Setting attributes in schema

wxdqz

New Member
I'm having a little problem with my schema.

What i'm trying to do is give an element an attribute in the schema, and then giving it a max value (which would be "999"). I think i've done it, but i'm not so sure if it works.

customer-id-number is meant to be the attribute that needs the max value.

here's the code:



<xsd:complexType name="customer-name" >
<xsd:sequence>
<xsd:element ref = "family_name"/>
<xsd:element ref = "given_name"/>
</xsd:sequence>
<xsd:attribute name="customer-id-number" type="xsd:integer" use="required" />
</xsd:complexType>

<xsd:element name="customer-id-number">
<xsd:simpleType>
<xsd:restriction base="xsd:integer">
<xsd:maxInclusive value =http://www.webdeveloper.com/forum/archive/index.php/"999"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
 
Back
Top