jhunter at xquery.com
Wed Jul 5 10:42:12 PDT 2006
> When I use calls to Element.getAttributeValue() I don't necessarily know
> what is the namespace of the looked up attribute.
For now, you might want to use getAttributes() and do a little manual
iteration. Maybe write a utility method.
Once upon a time a null namespace would mean to match any, but I don't
think that's in place anymore.
> Would it be considered as useful or as a sacrilege to implement a static
> Namespace to be used as a "wildcard" namespace ?
I think I'd prefer to avoid opening up the namespace can of worms unless
we had a really compelling reason. :)
A wildcard esp would be a pain because it would have to be rejected for
use as a normal namespace, one that's attached to nodes. You can't
construct an element with ANY, for example. This is why Michael's
approach of a separate type would be better. But that's a lot of mess
for something that could be done with a little iteration. (Iteration
isn't even slower, as it's what's done internally, because attribute
lists are assumed short.)
More information about the jdom-interest