[
Lists Home |
Date Index |
Thread Index
]
On Tue, 2002-08-20 at 08:06, John Cowan wrote:
> Amelia A Lewis scripsit:
> > This is not layering. This is directly changing processing. Namespace
> > declarations are not accessible through the infoset attributes
> > property. They are only available through the namespaces property, and
> > even so not directly (there isn't a namespace declarations property; in
> > a true infoset object model, the only way of knowing about a declaration
> > is detection of an additional namespace in the namespaces property of a
> > newly-entered element information item).
>
> Not so. The [namespace attributes] property is, indeed, what you
> refer to as a "namespace declarations" property; what you call the
> "namespaces" property, properly named [in-scope namespaces], is
> fully redundant to it. Both properties exist in element info items
> in order to partly reconcile the conflicting models of DOM and XPath.
*sigh* My bad for writing responses before the coffee has had a chance
to have an effect.
> > As an infoset advocate, you really *should* be aware of all the nuances.
>
> Or even as an opponent.
I hope that I don't appear to be an opponent of infoset. As a part of
my job, I have to disentangle non-XML folks who are moving to XML
representations and the corresponding APIs, who trip over various
problems. In order to do so, one of the things that we repeat, ad
nauseam, is that namespace declarations are not attributes. And we
avoid use of DOM, insofar as that is possible (pretty far), because its
handling of the namespace declaration versus attribute distinction is so
poor.
We use infoset because it maps nicely to SAX2, which is in relatively
heavy use, and because we have some additional (proprietary, I'm afraid)
APIs that are infoset-based (both streaming and in-memory). The
interaction of namespaces and attributes is one of the most commonly
encountered problems in attempting to bring order out of chaos (or even
disorder, which would be some improvement). Chief among the problems
are the use of attribute definitions (particularly in DOM, where it is
used) to declare namespaces (some implementations fail to notice the
"specialness" of these attributes, so they act as attributes, not as
namespace declarations), and the fact that attributes cannot be in the
default namespace. The magic prefix for namespace declarations doesn't
help much in trying to convince folks that prefixes aren't important.
In any event, I misspoke; there is a property representing the namespace
declarations. But please note that I'm not an infoset opponent, by any
means.
Amy!
--
Amelia A. Lewis amyzing@talsever.com alicorn@mindspring.com
It's is not, it isn't ain't, and it's it's, not its, if you mean it is.
If you don't, it's its. Then too, it's hers. It isn't her's. It isn't
our's either. It's ours, and likewise yours and theirs.
--OUP Edpress News
|