Re: [xml] Question on XML

On Mon, Dec 08, 2003 at 05:28:43PM -0800, Avneet Ghai Puri wrote:
Resending response.
Thanks for the speedy response. Comments inline.

Daniel Veillard <veillard redhat com> wrote:

On Mon, Dec 08, 2003 at 02:00:54PM -0800, Avneet Ghai Puri wrote:

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?

  in the regexp engine on transition changes. The fact that it's not
easy to find out does not mean it doesn't work.

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=?>


    <xsd:simpleType name=?String30?>

         <xsd:restriction base=?xsd:string?>

             <xsd:minLength value=?1?/>

            <xsd:maxLength value=?30?/>



  Well that's not even well-formed ! Could you please follow the 
guidelines for getting help !!!!
 I *really* do not see why trying with an example and if it fails with
xmllint --schema *then* report the problem is too hard to follow !

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.

  that's different from min/max ... that does work at the Relax-NG level.
I think that should work with Schemas too. Try it instead of asking 
whether this would work !!!
  I a nutshell do your part of the job as asked on the web page about getting
help, and then I will do my part of the job !


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]