xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Hallvard Trætteberg <hal AT idi.ntnu.no>
- To: <xom-interest AT lists.ibiblio.org>
- Subject: RE: [XOM-interest] Namespace Mappings
- Date: Tue, 11 Jan 2005 22:49:47 +0100
> From: John Cowan <cowan AT ccil.org>
>
> I believe a custom namespace map class (call it XPathContext) is much
> better. Using an Element is a little perverse, especially when the
> Element is being used just to hold namespaces and has no role in
> the document. In addition, an XPathContext can be eventually extended
> to support variables and the other things XPath allows, whereas adding
> those APIs to an Element would make little or no sense.
>
> It would be reasonable, however, to have an XPathContext constructor
> that takes an Element and copies the namespace bindings out of it.
Another possibility is to define an interface for (read-only) namespace
mapping that Element could implement, in addition to a custom (writable)
implementation. The custom one could have a parent, so you could define a
mapping based on an Element (or another namespace map) and add other
prefixes, particularly for the default/empty namespace.
Hallvard
-
[XOM-interest] Namespace Mappings,
Elliotte Harold, 01/11/2005
- Re: [XOM-interest] Namespace Mappings, John Cowan, 01/11/2005
- <Possible follow-up(s)>
- RE: [XOM-interest] Namespace Mappings, Hallvard Trætteberg, 01/11/2005
Archive powered by MHonArc 2.6.24.