[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XPath calculation
- From: Rick Jelliffe <ricko@allette.com.au>
- To: xml-dev@lists.xml.org
- Date: Sun, 11 Feb 2001 07:04:25 +0800
A less brute-force way (if the IDs are already hashed, or if perhaps the
document was deep rather than broad) would be:
0) Use the root as the default anchor.
1) Find any elements with IDs closer than the root element.
2) Find the closest of these elements.
3) Find any unique paths which are shorter than the length of the current
element.
Use the closest of these as the anchor.
Cheers
Rick Jelliffe