Re: [xml] Unable to validate a dtd using libxml
- From: Vidhya Anand <vidhyanarayanaswamy yahoo com>
- To: xml gnome org
- Cc: veillard redhat com
- Subject: Re: [xml] Unable to validate a dtd using libxml
- Date: Tue, 11 Jun 2002 03:06:28 -0700 (PDT)
--- Daniel Veillard <veillard redhat com> wrote:
On Tue, Jun 11, 2002 at 08:32:10AM +0530, Vidhya
Anand wrote:
Hi
I am unable to validate any dtd using libxml. Used
description provided
by you in a mailing list to validate dtd.
(http://mail.gnome.org/archives/xml/2001-November/msg00178.html)
The dtd file(winfodtd.txt) and related error
messages(error message.txt)
are attached. Can you please point out the problem
with my input? Any
help will be appreciated.
you're trying to parse the standalone DTD with the
XML content parser
no surprize it doesn't work !
Use xmlParseDTD().
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/
Thanks for your prompt response.
I am using xmlParseDTD as described in your mail. My
code reads as follows and the behaviour is as
described in previous mail. I am unable to figure my
problem:
if ((dtd = xmlParseDTD(NULL, (const xmlChar *)
dtdvalid.c_str())) == NULL)
{
printf ("Could not parse DTD\n") ;
}
else
{
xmlValidCtxt cvp;
cvp.userData = (void *) stderr;
cvp.error = (xmlValidityErrorFunc) fprintf;
cvp.warning = (xmlValidityWarningFunc) fprintf;
if (!xmlValidateDtd(&cvp, _doc, dtd))
{
printf ("XML contents does not validate
against DTD\n");
}
}
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]