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: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: peter murray-rust <pm286 AT cam.ac.uk>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Higher level namespace declarations for compactness
  • Date: Sun, 24 Sep 2006 07:27:01 -0400

peter murray-rust wrote:

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.

The prefixes are hard coded because they are significant; for instance to DTDs and some pre-namespace tools. The worst problem in practice is probably XPath expressions in attribute values, with DTDs a close second.

At one point a few years ago I attempted to implement a non-significant prefix scheme for JDOM. It simply did not work; and I doubt any such scheme could except in very limited circumstances. I wish that it were otherwise, but it's not. This is simply one of the rougher edges of XML. Sorry. :-(

--
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/




Archive powered by MHonArc 2.6.24.

Top of Page