xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Elliotte Harold <elharo AT metalab.unc.edu>
- To: Wolfgang Hoschek <whoschek AT lbl.gov>
- Cc: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] Exclusive Canonicalizer
- Date: Mon, 24 Jan 2005 19:11:35 -0500
Wolfgang Hoschek wrote:
How about decoupling the exclusive Canonicalizer CVS from the XPath impl by having
I haven't written the exclusive canonicalizer yet. Do you mean the document subset canonicalizer?
public final void write(Nodes nodes)
It's possible, and indeed I originally planned to do it that way. However, there are some tricky bits:
1. The Nodes argument can't contain nodes from multiple documents.
2. The canonicalizer would have to sort the Nodes into document order (doable)
3. The canonicalizer would have to remove duplicates from the Nodes. (doable)
4, I don't think the Nodes could be disconnected from a Document. I'm not sure about this. Perhaps they could.
The real issue is that document subset canonicalization is defined in terms of an XPath expression selecting a list of nodes from a document. It is not defined in terms of an arbitrary list of nodes. I'm worried that there might be unexpected side effects if I attempt to canonicalize just anything.
Then again I can see good reasons to want to do this. Possibly I could provide both options, but we'd need to consider what would happen with arbitrary Nodes objects first.
I also wonder if maybe passing a Nodes object should have different semantics than passing in a document and an XPath expression that selects those nodes. For instance, you might want to fully canonicalize each node and all its descendants, attributes, and namespaces rather than just the start-tags and end-tags you'd get with an XPath expression that only selected those elements.
--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim
-
[XOM-interest] Exclusive Canonicalizer,
Wolfgang Hoschek, 01/24/2005
-
Re: [XOM-interest] Exclusive Canonicalizer,
Elliotte Harold, 01/24/2005
- Re: [XOM-interest] Exclusive Canonicalizer, Wolfgang Hoschek, 01/24/2005
-
Re: [XOM-interest] Exclusive Canonicalizer,
Elliotte Harold, 01/24/2005
Archive powered by MHonArc 2.6.24.