On Tue, 26 Feb 2002, Tom Oehser wrote: > > ... > > > > <one xmlns='asdf'><two three='four'></two></one> > > > > > > //*[name()='one']/two/@three > > ... > > > We went 'round and 'round on this, and I think we're correct. > > ... > > So, in the case where I really am not sure what the namespace will be, > or if there will even be one, as the spec I am working from is in flux > with regard to the namespaces but not the elements, I have to do: > > //*[name()='one']//*[name()='two']/@three
Ayup. But, remember, the element named <bob> in the "http://foo.org/" namespace is vastly distinct from an element named <bob> in the "http://bar.org/" namespace. So, I guess I don't see the problem, as if you treat both <bob> elements identical, you might as well tread <bob> and <fred> as equivalent also. XPaths are based on the QName, which is the NS+name, not just the name. > ??? ick, there must be a better way. Nope, not yet. > XPath-2 will allow *:name, won't > it? When/if will that be a reality? Of is there a better way now? I haven't tracked xpath-2 much, yet. > What about xquery things? I have documents where dom navigation is > ugly, xpath is ugly, what else is there? I think that if you truly want to do what you're saying, then probably you have bigger semantic issues with your data. -bob _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user
