Fwd: Re: [xsd-users] Lines numbers after parsing

Boris Kolpackov boris at codesynthesis.com
Sun Jul 8 04:05:03 EDT 2007


Hi Jon,

Jon D <tyrecius13 at yahoo.com> writes:

> If you have the desire and capability to pursue this further, I can
> provide some minimal demonstration code. I think that the most likely
> problem is that at one point (circa 2001), cloneNode() just ignored
> user data completely
> (https://issues.apache.org/jira/browse/XERCESC-48). Perhaps when they
> added userDataHandlers into the library, notifications were
> inconsistently added.

I would definitely like this bug reported and fixed in Xerces-C++.
I checked and it appears the DOMUserDataHandler interface is supposed
to support cloning. Are you saying if you clone the whole tree (from
DOMDocument) then the corresponding clone events are not triggered
on DOMUserDataHandler? What about the current SVN version?

> Ideally, the solution would be either a patch on Xerces-c fixing the
> bug or a patch on xsd allowing a tree to be created without cloning
> the DOM nodes.

Actually the upcoming version (3.0.0) will support re-using DOM trees
without cloning. For that a new flag, xml_schema::flags::own_dom, was
added. You can already get this functionality in the latest 3.0.0.b2.
For more information on this flag see Chapter 3, "Parsing" in the
C++/Tree Mapping User Manual that comes with the 3.0.0.b2 release.
The final 3.0.0 should be released in 2-3 weeks.


hth,
-boris




More information about the xsd-users mailing list