Hi,
from within my reference resolver I'm using the method AuthorDocumentController.findNodesByXPath() and this usually works fine. However, when I include this file with xinclude in another file the reference can no more be resolved because findNodesByXPath returns an empty array. My xpath is something like "ancestor::MyNodeName". Is this a known limitation or did I do anything wrong?
Thanks and regards,
Patrik
findNodesByXPath within referenced content not working
-
- Posts: 793
- Joined: Wed Nov 16, 2005 11:11 am
Re: findNodesByXPath within referenced content not working
Hi Patrik,
Unfortunately xincluded sections are no transparent to findNodesByXPath (and for that matter to any XPath execution API). If the expression is simple enough I think you could just iterate yourself on the Author nodes model (at least for getting an ancestor it should be simple enough). I'll add an issue to consider treating the XInclude as transparent.
Best regards,
Alex
Unfortunately xincluded sections are no transparent to findNodesByXPath (and for that matter to any XPath execution API). If the expression is simple enough I think you could just iterate yourself on the Author nodes model (at least for getting an ancestor it should be simple enough). I'll add an issue to consider treating the XInclude as transparent.
Best regards,
Alex
Re: findNodesByXPath within referenced content not working
Hi Alex,
as you suggested I implemented my own "interpreter" when the xpath matches "ancestor:<NodeName>" and it works fine now. Thanks.
Patrik
as you suggested I implemented my own "interpreter" when the xpath matches "ancestor:<NodeName>" and it works fine now. Thanks.
Patrik