Re: [xml] followup on inserting dtd
- From: Daniel Veillard <veillard redhat com>
- To: Deryk Robosson <deryk www iitowns com>
- Cc: xml gnome org
- Subject: Re: [xml] followup on inserting dtd
- Date: Wed, 10 Apr 2002 15:20:26 -0400
On Sun, Apr 07, 2002 at 03:26:54PM +0800, Deryk Robosson wrote:
Okay, I managed to find the thread:
http://mail.gnome.org/archives/xml/2002-January/msg00226.html
The search facility is rather useless..manually skimming the subjects was
the key. However, the final entry of that thread is exactly the state
that I am in also. Doing it the way Daniel suggests as:
doc = xmlNewDoc("1.0");
dtd = (xmlDtdPtr) xmlParseDTD("netlogon",
"/home/deryk/netlogon/netlogon.dtd");
/* here to ... are Daniels suggested methods */
doc->intSubset = dtd;
if(doc->children == NULL)
xmlAddChild((xmlNodePtr)doc, (xmlNodePtr)dtd);
else
xmlAddPrevSibling(doc->children, (xmlNodePtr)dtd);
...
xmlDocDump(stderr, doc);
Looks correct,
Still does not insert the external doctype reference into the document as
one would expect. The document itself is generated fine no problems.
Damn, well there is only One True Way: take a debugger, put a breakpoint
in xmlDocDump and see what happens. I could do this, but you are in a better
situation to do it, isn't it ?
Given the nature of the library and the document formats in general one
would presume that it would indeed be as simple as adding another node to
the list as all the snippets I've seen would suggest. :)
Well DTDs are a bit more complex in the sense that they aren't part
part of the document tree as usual, they are not XML themselves.
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/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]