xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Tatu Saloranta <cowtowncoder AT yahoo.com>
- To: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] Canonicalizer Performance
- Date: Mon, 28 Aug 2006 13:26:36 -0700 (PDT)
--- Wolfgang Hoschek <wolfgang.hoschek AT mac.com> wrote:
>
> On Aug 28, 2006, at 11:13 AM, Michael Kay wrote:
>
...
> > If you have 30,000 elements in your document, and
> each has an
> > average of
> > 1000 namespace prefixes in scope, then there will
> be 30,000,000
...
> Rather, the namespaces might be *partitioned* over
> the document.
> Something like this
>
> <root>
> <elem xmlns:ns1="http://foo">...</elem?
> <elem xmlns:ns2="http://foo">...</elem?
> ...
> <elem xmlns:ns3="http://foo">...</elem?
> </root>
>
> I've occasionally seen such output from some SOAP
> serializers.
> Admittedly not the kind of input one might hope for,
> but at the same
> time, not something that should cause dramatic
> degradation or failure.
I would tend to agree with this: there are cases where
automatic namespace handling (especially in streaming
mode)
would be essentially re-binding limited number of
namespace
URIs over and over again. This may be what causes
observed
behavior.
Problem is that if namespace prefixes are bound as
needed
(which makes sense, so that application need not
bother
about keeping track of bindings), and the common root
element
does not refer to namespaces that (all) its children
do, declarations
are needed at the next level, and only bounded at
children elements.
If this is done in streaming way, there is no way to
promote
these bindings up, even serializer wanted to.
Now, serializer can of course try to reuse existing
bindings,
but that may be less efficient (or just more
complicated)
than just generating new ones: or perhaps it's thought
it
to be bad habit to reuse prefixes (might cause
confusion to
human readers, who tend to focus on prefixes, instead
of
parsers that know what prefixes expand to).
But in the end, considering potential drawbacks
(polluting
prefix namespace, if nothing else), I think I will
next check
how my favorite streaming serializer will deal with
this in
automatic-binding mode. ;-)
-+ Tatu +-
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-
Re: [XOM-interest] Canonicalizer Performance
, (continued)
-
Re: [XOM-interest] Canonicalizer Performance,
Wolfgang Hoschek, 08/28/2006
-
Re: [XOM-interest] Canonicalizer Performance,
Michael Kay, 08/28/2006
-
Re: [XOM-interest] Canonicalizer Performance,
John Cowan, 08/28/2006
- Re: [XOM-interest] Canonicalizer Performance, Wolfgang Hoschek, 08/28/2006
- Re: [XOM-interest] Canonicalizer Performance, Michael Kay, 08/28/2006
- Re: [XOM-interest] Canonicalizer Performance, Wolfgang Hoschek, 08/28/2006
- Re: [XOM-interest] Canonicalizer Performance, Michael Kay, 08/28/2006
- Re: [XOM-interest] Canonicalizer Performance, Steve Loughran, 08/28/2006
-
Re: [XOM-interest] Canonicalizer Performance,
John Cowan, 08/28/2006
-
Re: [XOM-interest] Canonicalizer Performance,
Michael Kay, 08/28/2006
-
Re: [XOM-interest] Canonicalizer Performance,
Wolfgang Hoschek, 08/28/2006
- Re: [XOM-interest] Canonicalizer Performance, Wolfgang Hoschek, 08/28/2006
-
Re: [XOM-interest] Canonicalizer Performance,
Sean Truman, 08/28/2006
- Re: [XOM-interest] Canonicalizer Performance, Nils Kilden-Pedersen, 08/28/2006
Archive powered by MHonArc 2.6.24.