Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   A query regarding validation of xml-schemas (http://www.velocityreviews.com/forums/t165839-a-query-regarding-validation-of-xml-schemas.html)

Divya Alice George 10-10-2003 04:11 AM

A query regarding validation of xml-schemas
 
Dear Sir,
My problem is that i am required to validate a given schema
against the standard DTDs provided by w3.org- namely xmlschema.dtd and
datatypes.dtd.
Presently, I load the given schema into an ActiveXObject and use
the function validate(). The function validate() does some sort of
validation of the given schema aginst the standard dtds mentioned
above and throws error in case the validation fails.
But there are many cases which this function validate() does not
check for .. like for example, the function does not check whether the
value of the maxOccurs attribute is always greater than or equal to
the minOccurs attribute. Similarly there are many issues that the
function validate() does not address.
I would like to know whether there is any available function which
checks for all the cases and decides if the schema conforms to the
standard dtds provided by w3.org.
or are we supposed to create our own functions to check for these
extra cases not addressed by function validate().
I would greatly appreciate it if you could mail me the answer to this
query.
Thankyou.
regards,
Divya Alice George

Martin Boehm 10-10-2003 09:44 AM

Re: A query regarding validation of xml-schemas
 
"Divya Alice George" <div174@yahoo.com> wrote in message
news:65129ef0.0310092011.5c9f9fa7@posting.google.c om

> Dear Sir,


There is more than one in this group. ;-)

> [...]
> But there are many cases which this function validate() does not
> check for .. like for example, the function does not check whether the
> value of the maxOccurs attribute is always greater than or equal to
> the minOccurs attribute.


You cannot accomplish such a thing with a DTD, it is technically
impossible. Thus it is not the fault of the validate() method not to
find this kind of error.
Being valid does not imply that the XML file makes sense.

> or are we supposed to create our own functions to check for these
> extra cases not addressed by function validate().


Have a look at the SOM (Schema Object Model), it may help you a bit
further. At least it may keep you from implementing high level checking
from scratch, reducing the task to a few "for each ... in ..." loops.

> I would greatly appreciate it if you could mail me the answer to this
> query.


SELECT 'No'

Martin

P.S.: I don't think it is to much asked to check one thread in one
newsgroup, even through groups.google.




All times are GMT. The time now is 06:00 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57