Bugs item #569927, was opened at 2002-06-17 11:43
Message generated for change (Settings changed) made by maartenc
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=116035&aid=569927&group_id=16035

Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Aaron Bell (a1r)
>Assigned to: Maarten Coene (maartenc)
Summary: no namespace in Attribute.getUniquePath

Initial Comment:
The implementation of getUniquePath in AbstractAttribute never 
includes a namespace prefix.

Current 
implementation:

Element parent = getParent();
return 
( parent != null && parent != context ) ? parent.getUniquePath( 
context ) + "/@" + getName() : "@" + getName();

Should be 
something like (inspired by AbstractElement's 
implementation):

Element parent = 
getParent();
String xpath = null;
String name = 
null;
String uri = getNamespaceURI();
String prefix = 
getNamespacePrefix();

// get qualified name if 
necessary
if ( uri == null || uri.length() == 0 || prefix == null || 
prefix.length() == 0) {
  name = getName();
} else {
  name = 
getQualifiedName();
}

if (parent != null && parent != 
context) {
  xpath = parent.getUniquePath( context ) + "/@" + 
name;
} else {
  xpath = "@" + name;
}
return xpath;

----------------------------------------------------------------------

>Comment By: Maarten Coene (maartenc)
Date: 2004-06-23 15:49

Message:
Logged In: YES 
user_id=178745

Fixed in CVS!
Thanks for reporting.

Maarten

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=116035&aid=569927&group_id=16035


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
dom4j-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to