Re: [xml] How to extend the Reader interface with a dup() function
- From: Daniel Veillard <veillard redhat com>
- To: Nanning Buitenhuis <nanning elvenkind com>
- Cc: xml gnome org
- Subject: Re: [xml] How to extend the Reader interface with a dup() function
- Date: Sun, 2 Nov 2003 19:02:25 -0500
On Sun, Nov 02, 2003 at 11:58:17PM +0100, Nanning Buitenhuis wrote:
Yes, but I like your first solution better: It just does what needed
to be done, no tricks or other complexity.
But I won't implement it, because an API which works "sometimes"
is not something I want to provide support for. If you cannot freeze
the state of the IO then this does not work. I do not want to bury this
in an API. The Expand solution where the logical subtree for the range
you need is kept available is fine, but duplicating information using an
API which may fail or deliver different informations in the general case
(e.g. when running XInclude in the first stream information may not be
available but becomes available in the second pass) is not proper.
If there is a single document being parsed, then there is a single parser
context, or there is 2 document being parsed and you must accept rescanning
from scratch because it is a second document.
You cannot design APIs on cornercase. Expanding the available subtree
is the logically correct solution to your problem, not parsing twice.
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]