// (absolute) path to the proxied element; otherwise, we just
// append the name of the proxied element to the parent's xpath
final XPath parentXPath = ((ProxyElement) parent).xpath;
if (parentXPath == null) {
if (ns != null) {
xpath = new ODOMXPath(new StringBuffer(ns.getPrefix()).
append(':').
append(details.getElementName()).
toString(),
namespaces);
} else {
xpath = new ODOMXPath(details.getElementName(), namespaces);
}
} else {
if (ns != null) {
xpath = new ODOMXPath(parentXPath,
new StringBuffer(ns.getPrefix()).
append(':').
append(details.getElementName()).
toString(),
namespaces);
} else {
xpath = new ODOMXPath
(parentXPath, details.getElementName(), namespaces);
}
}
} else {
// Parent is a non-null non-ProxyElement