Hi,
I am currently validating an XML file against a Schema using
XMLValidatingReader. The schema actually contains ranges for particular
elements and I have been using it to detect range errors before it gets to
my program. The way the rangechecking works is that every element that needs
range checking is defined as an element with a particular type in the XSD.
For example,
<xs:element name="Row" maxOccurs="48">
<xs:complexType>
<xs:sequence>
<xs:element name="Price" type="PriceType" default="0"
minOccurs="0" />
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
The type has the range embedded within it:
<xs:simpleType name="PriceType">
<xs:restriction base="xs:double">
<xs:minInclusive value="0" />
<xs:maxInclusive value="0.002" />
</xs:restriction>
</xs:simpleType>
So, now when I validate my XML file against a schema using the
XMLValidatingReader, it will tell me if the value entered in the XML file is
valid or not.
However, I want to disable the rangechecking on my data for certain
operations. Is there any way I can do this?
I still want to detect if the user entered an invalid type or if the user
did not put in the correct xml tag. I just don't want the
XMLValidatingReader performing the rangechecking. If anybody knows how do do
this, please post a response.
Thanks,
MT