A
Ashton
I have the following in my schema file
<!-- =========== -->
<xs:simpleType name="TextSubjectString">
<xs:annotation>
<xs:documentation>String data.</xs:documentation>
</xs:annotation>
<xs:restriction base="UsAsciiPrintableString">
<xs:minLength value="1"/>
<xs:maxLength value="20"/>
</xs:restriction>
</xs:simpleType>
<!-- =========== -->
<xs:simpleType name="UsAsciiPrintableString">
<xs:annotation>
<xs:documentation>Unformatted text.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xsattern value="[\p{IsBasicLatin}-[\p{C}]]*"/>
</xs:restriction>
</xs:simpleType>
<!-- =========== -->
It looks to me that this should accept pretty much any string between
1 and 20 characters that doesnt contain characters that are invalid in
XML 1.0 name. However, MSXML4.0 validation fails anything that isn't
exactly one character long. XMLSpy validates the way I thought it
would. Any idea why it works in Spy and not MSXML4.0?
Thanks
<!-- =========== -->
<xs:simpleType name="TextSubjectString">
<xs:annotation>
<xs:documentation>String data.</xs:documentation>
</xs:annotation>
<xs:restriction base="UsAsciiPrintableString">
<xs:minLength value="1"/>
<xs:maxLength value="20"/>
</xs:restriction>
</xs:simpleType>
<!-- =========== -->
<xs:simpleType name="UsAsciiPrintableString">
<xs:annotation>
<xs:documentation>Unformatted text.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xsattern value="[\p{IsBasicLatin}-[\p{C}]]*"/>
</xs:restriction>
</xs:simpleType>
<!-- =========== -->
It looks to me that this should accept pretty much any string between
1 and 20 characters that doesnt contain characters that are invalid in
XML 1.0 name. However, MSXML4.0 validation fails anything that isn't
exactly one character long. XMLSpy validates the way I thought it
would. Any idea why it works in Spy and not MSXML4.0?
Thanks