You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Steve Burkett <sb...@real.com> on 2001/08/11 03:06:48 UTC

schema validation

hello,  a beginner question   (xerces 5.1 on windoze NT 4, from 
http://xml.apache.org/dist/xerces-c/stable/)

i put an error in personal.xml in the xerces samples:

   <person xid="Big.Boss" contr="xxxx" >    //an error according to DTD or 
the schema

i ran \xerces\xerces-c1_5_1-win32\bin\DOMPrint -s personal.xml.  this xml 
references a DTD, and it error'ed correctly (the person attribute should be 
"id", not "xid")

however, i made the same change to personal-schema.xml, & ran "DOMPrint -s 
personal-schema.xml", and the parser didn't catch the error.  in fact, the 
parser seems to not even read in the "xsd" schema, since i can type garbage 
in it and it doesnt detect the garbage.

apparently, xml schema validation doesnt work at all.  Can someone point 
out how i'm using it wrong?

thanks!


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


RE: schema validation

Posted by Alfredo <al...@eversystems.com>.
use namespace validation option in the command line, it should work.
Alfredo

-----Original Message-----
From: Steve Burkett [mailto:sburkett@real.com]
Sent: Friday, August 10, 2001 9:07 PM
To: xerces-c-dev@xml.apache.org
Subject: schema validation


hello,  a beginner question   (xerces 5.1 on windoze NT 4, from
http://xml.apache.org/dist/xerces-c/stable/)

i put an error in personal.xml in the xerces samples:

   <person xid="Big.Boss" contr="xxxx" >    //an error according to DTD or
the schema

i ran \xerces\xerces-c1_5_1-win32\bin\DOMPrint -s personal.xml.  this xml
references a DTD, and it error'ed correctly (the person attribute should be
"id", not "xid")

however, i made the same change to personal-schema.xml, & ran "DOMPrint -s
personal-schema.xml", and the parser didn't catch the error.  in fact, the
parser seems to not even read in the "xsd" schema, since i can type garbage
in it and it doesnt detect the garbage.

apparently, xml schema validation doesnt work at all.  Can someone point
out how i'm using it wrong?

thanks!


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: schema validation

Posted by Alberto Massari <al...@exceloncorp.com>.
At 18.06 10/08/2001 -0700, you wrote:
>hello,  a beginner question   (xerces 5.1 on windoze NT 4, from 
>http://xml.apache.org/dist/xerces-c/stable/)
>
>i put an error in personal.xml in the xerces samples:
>
>   <person xid="Big.Boss" contr="xxxx" >    //an error according to DTD or 
> the schema
>
>i ran \xerces\xerces-c1_5_1-win32\bin\DOMPrint -s personal.xml.  this xml 
>references a DTD, and it error'ed correctly (the person attribute should 
>be "id", not "xid")
>
>however, i made the same change to personal-schema.xml, & ran "DOMPrint -s 
>personal-schema.xml", and the parser didn't catch the error.  in fact, the 
>parser seems to not even read in the "xsd" schema, since i can type 
>garbage in it and it doesnt detect the garbage.
>
>apparently, xml schema validation doesnt work at all.  Can someone point 
>out how i'm using it wrong?

Hi Steve,
to perform an XMLSchema validation you need to turn on namespace 
processing; try adding the -n command line option.

Alberto

-------------------------------
Alberto Massari
eXcelon Corp.
http://www.StylusStudio.com


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org