Re: [xml] xmlwriter - fix for DTD part

On Sun, Mar 21, 2004 at 06:28:54PM +0100, Mickautsch, Alfred wrote:

I made some changes to the xmlwriter, to make the DTD part
usable. I also made some other general reorganizing work.
Maybe this can be included into the library.

What I did:
- eliminate some redundant code (which never was in sync) in
  the string writing functions:
  - xmlTextWriterWriteRawLen
  - xmlTextWriterWriteString
  - xmlTextWriterWriteBase64
  - xmlTextWriterWriteBinHex

- added some new functions which were defines pointing to
  - xmlTextWriterEndDTDElement
  - xmlTextWriterEndDTDAttlist
  - xmlTextWriterEndDTDEntity

- added a new function for writing the contents of an
  external entity:
  - xmlTextWriterWriteDTDExternalEntityContents

- xmlTextWriterEndDTD now does what it sais: it ends a
  DTD (and not only the current DTD element).

- everything else should behave like before (I hope). Since
  the only major change is that to xmlTextWriterEndDTD and
  considering that writing DTD elements, attribute lists and
  entities did not work before (at least for me), there
  should not be any inconsistancy problem. But who knows...

- added testWriter2.c, an example for using the DTD writing
  API funcs and some corresponding output files.

- Lucas, I tried to extend your indenting functionality to
  the DTD part but I do not know if the result is acceptable.

Well, that's all. I hope I didn't break anything but I am
sure I forgot to mention some other changes I made :-).

  I went though the patch, I am a bit concerned about API or ABI breakages
The fact that you reformated the header confused me a lot, I could not
distinguish potential API changes from pure reformatting (especially
since the old formatting was made consistent with the rest of libxml2 
headers and I will have to change those back at some point for consistency).
  Using the resulting libxml2-api.xml I could spot a small API break:
a couple of macros have been removed (without function replacement)
but those should not be such a big deal, so I will commit the patch.

paphio:~/XML -> tar xvzf xmlwriter_20040321-1.tar.gz
gzip: stdin: invalid compressed data--crc error
tar: Child returned status 1
tar: Error exit delayed from previous errors
paphio:~/XML ->

 Can you regenerate the tar, it has a problem on my side.
I assume testWriter2.c is suppeds to be added to doc/examples as
well as the others elements in the archive.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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