Patches item #1230015, was opened at 2005-06-29 16:36 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=316035&aid=1230015&group_id=16035
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Chandu Natarajan (cnatar) Assigned to: Nobody/Anonymous (nobody) Summary: BettXpath generation through AbstractElement.getUniquePath() Initial Comment: Currently, the getUniquePath() when applied to Node or Element objects generates a 'short form' xpath that for namespace-prefixed nodes includes the prefix for example /xsd:schema/xsd:element. This generated xpath when applied, for instance within an XSLT transform (such as saxon etc) does not work because the XSLT processor is unable to associate the correct namespace uri with the 'xsd' prefix. In order to resolve this problem and various other issues related to locating namespaced nodes via dom4j generated xpath, I propose the attached fix. The attachment shows the difference in the org.dom4j.tree.AbstractElement class in the method getXPathNameStep(). Basically the last return statement should be changed from return getQualifiedName(); to return "*[local-name()='" + getName() + "' and namespace-uri()='" + uri + "']"; This will generate a more generic xpath that will work across different XSLT and XPATH processors and will always locate the correct node. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=316035&aid=1230015&group_id=16035 ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ dom4j-dev mailing list dom4j-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-dev