Re: [xml] What does xmlCtxtReadFile() validate?



On Tue, Jan 25, 2005 at 06:26:56PM +0100, Ronny Seemann wrote:
Hello

I work with the libxml2 version 2.6.11 and my plattform is embedded linux.
I want to validate a xml with his dtd. The example parse2.c use the function 
xmlCtxtReadFile() to validate the xml. Does this function really validates the 
File? 

   xmlCtxtReadFile
    http://xmlsoft.org/html/libxml-parser.html#xmlCtxtReadFile
    options:    a combination of xmlParserOption
    http://xmlsoft.org/html/libxml-parser.html#xmlParserOption
    XML_PARSE_DTDVALID = 16 : validate with the DTD

 With that option xmlCtxtReadFile() will attempt DTD validation of the
instance.

Are there changes ( for xmlCtxtReadFile() )between the version 2.6.11 and the 
latest one?

  If there was no changes I would not have released a new version. Sorry
I never dig out ancien versions to check. You can check new versions,
it's your side of the job to check it c.f.:
   http://xmlsoft.org/bugs.html
    
Can i actual use xmlCtxtReadFile() for dtd-validation or should i better use 

  yes

another function (e.g. xmlValidateDtd () of the modul valid)?

  no. xmlValidateDtd is not the validation as defined by the XML REC it
does not handle the internal subset. On the other hand you have control
over what DTD is used.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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