On Mon, Dec 08, 2003 at 02:00:54PM -0800, Avneet Ghai Puri wrote:
> Hello,
>
> I was looking at LibXML2 for validation of xml documents against a schema. The kind of things that I am looking for include things like:
> 1. array boundary checking
> 2. Min and max occurences
> 3. numeric value fits in a range.
>
> I was wondering whether the above is supported. I looked through the code and do not see it, but just wanted to make sure that I did not miss anything.
Min and Max constructs should be supported, I think you misread...Will it be possible to point me to what function/file is this being checked?
For array boundary, I can't see any part of the spec related to that...
Let me provide an example:
<?xml version=”1.0”?>
<xsd:schema xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>
<xsd:simpleType name=”String30”>
<xsd:restriction base=”xsd:string”>
<xsd:minLength value=”1”/>
<xsd:maxLength value=”30”/>
</xsd:restriction>
</xsd:simpleType>
Now when something of type String30 is seen in the XML document I will like to verify that it is with in the size of 1 to 30.
Rgds,
Avneet
please provide a pointer to the subsegment of the XML Schemas spec you're
refering to. Idem for "numeric value",
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/