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: Tatu Saloranta <cowtowncoder AT yahoo.com>
  • To: Elliotte Harold <elharo AT metalab.unc.edu>, 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 16:40:22 -0700 (PDT)

--- Elliotte Harold <elharo AT metalab.unc.edu> wrote:

> 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.
>
> 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. :-(

On a related note: it is still possible to get proper
prefix rewriting on output (such that result is output
with localName/URI pairs being correct and there being
no prefix conflicts, which may require prefix
changes), for example by using Stax stream writer -
based serializer (in repairing mode). Nux package
(library that has useful additions to XOM, including
full stax builder/serializer implementations) has such
integration. In repairing mode, writer uses local
name/URI pairs as the main information, and optionally
passed prefix as secondary 'preference'. This often
works quite well.

So this might be an option, if the exact prefixes used
are not limited by things Elliotte pointed out, in
your case.

-+ Tatu +-


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com




Archive powered by MHonArc 2.6.24.

Top of Page