From: Joe McAlerney (joey@silicondefense.com)
Date: Wed Jun 28 2000 - 20:10:12 EDT
Hello,
I am trying to build a document, and do some validating. I was unable
to find documentation on building a document from scratch, and
validating it along the way. I've produced a simplified version of my
code below.
xmlDtdPtr dtd;
xmlNodePtr root,alert;
xmlDocPtr doc;
extern int xmlDoValidityCheckingDefaultValue;
xmlDoValidityCheckingDefaultValue = 1;
doc = xmlNewDoc("1.0");
dtd = xmlParseDTD(NULL,"/usr/local/src/xml/idef-message.dtd"); //
error source
dtd->name = "idef-message";
doc->intSubset = dtd;
Here are a few of the errors that come from the line with the dtd
assignment.
/usr/local/src/xml/idef-message.dtd:28: error:
SAX.entityDecl(ext.attlist.version) called while not in subset
<!ENTITY % ext.attlist.version "">
^
/usr/local/src/snort-1.6/idef-message.dtd:36: error: PEReference:
%ext.attlist.version; not found
">
^
/usr/local/src/snort-1.6/idef-message.dtd:46: warning: PEReference:
%ext.attlist.global; not found
">
^
etc...
I am able to run xmllint -valid somefile.xml, and everything checks out
fine. I even altered the dtd to produce some errors to be sure.
My guess is that I'm not using the library correctly. Could someone
help me out?
Many thanks,
-Joe M.
---- Message from the list xml@xmlsoft.org Archived at : http://xmlsoft.org/messages/ to unsubscribe: echo "unsubscribe xml" | mail majordomo@xmlsoft.org
This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:30:17 EDT