Hi all
I'm sure this is a noob question and will be simple for you experts to answer here goes.
Why can I not restrict an element when it has attributes for example....
<xs:element minOccurs="0" maxOccurs="unbounded" name="Forename">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="Member" type="xs:boolean" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
I would want to restrict the length of the Name element to 30 characters.
I know a workaround is to define a new type, but if I only use this once in my schema surely this is inefficient??
Thanks in advance.
Chris.
I'm sure this is a noob question and will be simple for you experts to answer here goes.
Why can I not restrict an element when it has attributes for example....
<xs:element minOccurs="0" maxOccurs="unbounded" name="Forename">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="Member" type="xs:boolean" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
I would want to restrict the length of the Name element to 30 characters.
I know a workaround is to define a new type, but if I only use this once in my schema surely this is inefficient??
Thanks in advance.
Chris.