mike at saxonica.com
Mon Jul 3 07:50:11 PDT 2006
Searching when you only know the localName can be useful, but a couple of
(a) your proposed object (the wildcard) is not a Namespace, so it is wrong
to model it as one. Correct design would change the method to accept a
"NamespaceTest" object which could be either a Namespace or a
(b) you need to think carefully about whether you want to match "any
namespace", or "any namespace or none". Remember that technically, (and very
inconveniently) unqualified attribute names are not in any namespace: it's
wrong to refer to them as being in some default, unnamed, or null namespace.
From: jdom-interest-bounces at jdom.org [mailto:jdom-interest-bounces at jdom.org]
On Behalf Of Kevin POCHAT
Sent: 03 July 2006 14:45
To: jdom-interest at jdom.org
Subject: [jdom-interest] Namespace.ANY_NAMESPACE
I'm working on an app using a DTD to generate JDOM-based XML Parsers.
When I use calls to Element.getAttributeValue() I don't necessarily know
what is the namespace of the looked up attribute.
Would it be considered as useful or as a sacrilege to implement a static
Namespace to be used as a "wildcard" namespace ?
If useful, do you have any guidlines concerning various points to take care
of during such a development ? I currently just set it to be taken in
consideration in the Namespace.equals(Object ob) method.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the jdom-interest