[xml] Xinclude w/DTD segs



Hello Daniel; Hello All;
  First off, let me compliment your work on both libxml2 & libxslt!

I'm under the impression that Xinclude allows you to include a
complete, valid XML document, B, into another one, A. That is, 
that the both A and B _can_ (although they aren't required to)
have an XML and DOCTYPE declaration.  [It would seem to be one 
of the improvements over using an external entity]

If I'm wrong, please clarify  (of course one could argue that there
are friendlier validation diagnostics :>  )

At any rate, libxml2 v. 2.3.10 is seg'ing when B does have a DOCTYPE.

xmlCopyNodeList is calling xmlStaticCopyNodeList with explicit NULL's
for doc & parent,  but the latter clearly isn't expecting any of the
nodes to be XML_DTD_NODE's if doc is null.
Having only looked at the code for a few minutes, I can't really
suggest what it _should_ be doing....

Stack trace follows; THanks!!

Program received signal SIGSEGV, Segmentation fault.
0x400c14f5 in xmlStaticCopyNodeList (node=0x806bbb8, doc=0x0,
parent=0x0)
    at tree.c:2750
2750                if (doc->intSubset == NULL) {
(gdb) where
#0  0x400c14f5 in xmlStaticCopyNodeList (node=0x806bbb8, doc=0x0,
parent=0x0)
    at tree.c:2750
#1  0x400c15a2 in xmlCopyNodeList (node=0x806bbb8) at tree.c:2816
#2  0x400ea673 in xmlXIncludeLoadDoc (ctxt=0x806b0f0, 
    url=0x8069710 "terrain/index.xml", nr=0) at xinclude.c:415
#3  0x400eac74 in xmlXIncludeLoadNode (ctxt=0x806b0f0, nr=0) at
xinclude.c:685
#4  0x400eaecf in xmlXIncludeDoProcess (ctxt=0x806b0f0, doc=0x806b078)
    at xinclude.c:829
#5  0x400eaf32 in xmlXIncludeProcess (doc=0x806b078) at xinclude.c:861
#6  0x8049f2b in parseAndPrintFile (filename=0xbffff92d "index.xml")
    at xmllint.c:567
#7  0x804af59 in main (argc=3, argv=0xbffff7d4) at xmllint.c:916
#8  0x40161b5c in __libc_start_main (main=0x804a62c <main>, argc=3, 
    ubp_av=0xbffff7d4, init=0x804907c <_init>, fini=0x804b1ec <_fini>, 
    rtld_fini=0x4000d634 <_dl_fini>, stack_end=0xbffff7cc)
    at ../sysdeps/generic/libc-start.c:129

----------------
Bruce Miller
<bruce miller nist gov>  http://math.nist.gov/~BMiller/




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