I need to make some enhancements for my own purposes to the XPath functionality in dom4j. I understand that this functionality comes from Jaxen but I'm trying to figure out where to start right now.

When node.selectSingleNode("some/xpath") or another XPath call is made, I need to cross reference the element or attribute being selected back to a schema, dtd, or proprietary structure to make sure it was actually defined. So if someone's XPath asks for an element or element path that is undefined in the schema, I will throw an exception.

Likely, I need to extend some classes here but I'm not 100% sure where to start. I'd also be willing to take a less-integrated approach if I could somehow get a parsed XPath string that would normalize down to just elements/attributes (no select criteria)... like converting "/favorites/color[name='blue'[EMAIL PROTECTED]" to "/favorites/color/@rgbValue" where I can then easily tokenize it and compare it against the schema. I suppose this could be done manually but I'm guessing there are more XPath constructs I'd need to be able to parse which I am not aware of. I don't need any help with comparing it to the schema or DTD- I have that under control.

Thanks for your insight. If by the slim chance any of this ends up being useful to someone else, I'd be happy to contribute it back.

Brian



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
dom4j-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to