Hi,
I'm working with xml string validation against xsd schema.
I'm facing this problem . This is my xml string :
<A>
<Code></Code>
</A>
<Code> value is : 'A' , 'B' or empty string ('').
'A' , 'B' in lower and upper case .
xsd element definition :
<xs:element name="Code" type="tCode" minOccurs="0" maxOccurs="1" />
My simpletype :
<xs:simpleType name="tCode">
<xs:restriction base="xs:string">
<xs
attern value="((A|a)|(B|b))"/>
</xs:restriction>
</xs:simpleType>
This works fine with 'A' and 'B' . I can't validate null /empty string . What is the right definition ?
Could you help me ?
Thanks in advance .
I'm working with xml string validation against xsd schema.
I'm facing this problem . This is my xml string :
<A>
<Code></Code>
</A>
<Code> value is : 'A' , 'B' or empty string ('').
'A' , 'B' in lower and upper case .
xsd element definition :
<xs:element name="Code" type="tCode" minOccurs="0" maxOccurs="1" />
My simpletype :
<xs:simpleType name="tCode">
<xs:restriction base="xs:string">
<xs
</xs:restriction>
</xs:simpleType>
This works fine with 'A' and 'B' . I can't validate null /empty string . What is the right definition ?
Could you help me ?
Thanks in advance .