From: Charlie & Barbara Bozeman (cbozeman@HiWAAY.net)
Date: Thu Apr 13 2000 - 21:59:39 EDT
Thanks for looking at this, my application is a bit large so I built a
short test that causes the same type errors. To test it use your test
program like:
xmllint --copy --postvalid --noout b1.xml
Charlie B.
Daniel Veillard wrote:
>
> On Wed, Apr 12, 2000 at 11:11:21PM -0500, Charlie & Barbara Bozeman wrote:
> >
> > I have an application which parses an xml file, modifies the in-memory
> > document, copies the document (using xmlCopyDoc), then validates the
> > copy. I get error messages like the following:
> >
> > ado.dtd:39: error: SAX.entityDecl(ado-content.mix) called while not in
> > subset
> > '(name, daddr?, eaddr?, (g-ref | f-ref | field)+ )'
> > ^
> [...]
> > ado.dtd:105: error: PEReference: %common-idreq.att; not found
> > ea NMTOKEN #IMPLIED' >
> > ^
> [...]
> > ado.dtd:208: error: Extra content at the end of the document
> > <!ELEMENT ado %ado-content.mix; >
> > ^
> > Could not load the external subset "ado.dtd"
> >
> > I can reproduce these errors by typing:
> > xmllint --postvalid --copy --noout test.xml
> >
> > on my xml document. My dtd uses entities, is there some call I need to
> > be making after the document is copied?
>
> Seems a weakness of the xmlCopyDoc implementation. I added a lot
> of informations to the tree content since I checked it for the last
> time. At least some entities handling informations don't seems to be
> processed correctly (and I'm afraid some of the DTD element and attribute
> lookup tables need to be rebuilt).
> Could you send me an exemple of:
> - the code
> - the dtd/xml
> so it's faster for me to get those fixed.
>
> Daniel
>
> --
> Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes | Today's Bookmarks :
> Tel : +33 476 615 257 | 655, avenue de l'Europe | Linux XML libxml WWW
> Fax : +33 476 615 207 | 38330 Montbonnot FRANCE | Gnome rpm2html rpmfind
> http://www.w3.org/People/all#veillard%40w3.org | RPM badminton Kaffe
> ----
> Message from the list xml@xmlsoft.org
> Archived at : http://xmlsoft.org/messages/
> to unsubscribe: echo "unsubscribe xml" | mail majordomo@xmlsoft.org
<!ENTITY % common.att
'id ID #IMPLIED
role NMTOKEN #IMPLIED'>
<!ENTITY % ref.att
'ref IDREF #IMPLIED'>
<!-- root element -->
<!ELEMENT roote (sub1, sub2*)>
<!ELEMENT sub1 (first?, second+, last?) >
<!ELEMENT first (#PCDATA)>
<!ATTLIST first %common.att;>
<!ELEMENT second (name, cat?, dog?)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT cat EMPTY>
<!ELEMENT dog EMPTY>
<!ELEMENT last (#PCDATA)>
<!ELEMENT sub2 (name, a?, b?) >
<!--
# id - unique identifier in xml file
-->
<!ATTLIST sub2 %common.att;>
<!ELEMENT a EMPTY >
<!ATTLIST a %ref.att;>
<!ELEMENT b EMPTY >
<!ATTLIST b %ref.att;>
<?xml version="1.0"?>
<!DOCTYPE roote SYSTEM "b.dtd">
<roote xmlns="http://www.dum.org/file-location">
<!-- generic comment -->
<sub1>
<first id="csci">1</first>
<second>
<name>second name</name>
<cat/>
<dog/>
</second>
<second>
<name>other second name</name>
<cat/>
<dog/>
</second>
<last>o</last>
</sub1>
<sub2 id="patch" >
<name>Patch</name>
<a href="csci"/>
<b href="nad"/>
</sub2>
<sub2 id="nad" >
<name>Nad</name>
<a href="patch"/>
<b href="csci"/>
</sub2>
</roote>
---- 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:10 EDT