Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Higher level namespace declarations for compactness

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: peter murray-rust <pm286 AT cam.ac.uk>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Higher level namespace declarations for compactness
  • Date: Sun, 24 Sep 2006 13:23:24 +0100

At 12:28 24/09/2006, Elliotte Harold wrote:
peter murray-rust wrote:

Thanks very much for the rapid reply. Knowing that the problem is defined helps a lot.

I am not clear why the element prefixes have to be hardcoded other than for serialization. The only workaround I can think of is to copy the nodes and change the prefixes.

Another big reason: canonical XML and everything that depends on this including XML digital signatures.

Related (weaker) reason: testing

There are just too many things that break when you rewrite prefixes. :-(

I'm not surprised. My current practice - which I thought was appropriate - was to construct CML elements without a prefix. Now I shall construct them by default as "cml:atom", etc. I have to hope (reasonably) that this prefix is unlikely to have collisions. I assume that even when there are prefix collisions the output is namespace-valid even if fairly human-unreadable...

Prefixes also have the benefit that users (who are not always aware of the subtleties of namespaces) will see that all CML elements have a prefix and that namespaces are mandatory.

P.


--
Elliotte Rusty Harold elharo AT metalab.unc.edu
Java I/O 2nd Edition Just Published!
http://www.cafeaulait.org/books/javaio2/
http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/

Peter Murray-Rust
Unilever Centre for Molecular Sciences Informatics
University of Cambridge,
Lensfield Road, Cambridge CB2 1EW, UK
+44-1223-763069




Archive powered by MHonArc 2.6.24.

Top of Page