Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Need to preserver duplicate namespacedeclarations

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Wolfgang Hoschek <whoschek AT lbl.gov>
  • To: Elliotte Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Need to preserver duplicate namespacedeclarations
  • Date: Tue, 9 Aug 2005 16:46:11 -0700

On Aug 9, 2005, at 4:35 PM, Elliotte Harold wrote:

Wolfgang Hoschek wrote:

If one wanted to recreate the exact same XOM document, preserving additional namespace declarations "as is" is key.


What constitutes the "exact same document" is a matter of some debate. XOM is never going to provide exact handling of white space inside tags, character references, the formatting of the DTD, and so forth; and I don't think you really want it to. Once you've ruled out the idea of byte-per-byte equivalence, I doubt any one model will satisfy everyone perfectly. XOM very closely follows the XPath 1.0 data model, with a few small exceptions. (XOM does provide access to the DOCTYPE declaration that XPath doesn't. It also makes some effort to maintain base URIs.) I agree with Michael Kay that the XPath data model is more sensible than the full Infoset model. However, these are hardly the only two such models; and others are possible.

True, but that's besides the point since I referred to the the "exact same XOM document", not the "exact same document". The "exact same XOM document" is easy to define: It is the same as "new Document (doc)", i.e. a faithful copy; it has identical XOM nodes, values and other retrievable properties in the very same node locations as the original document (subclasses are considered out of scope).

Wolfgang.




Archive powered by MHonArc 2.6.24.

Top of Page