findNodesByXPath within referenced content not working
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 280
- Joined: Thu Nov 28, 2013 9:32 am
- Location: Hamburg/Germany
- Contact:
findNodesByXPath within referenced content not working
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
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
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: findNodesByXPath within referenced content not working
Post by alex_jitianu »
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
-
- Posts: 280
- Joined: Thu Nov 28, 2013 9:32 am
- Location: Hamburg/Germany
- Contact:
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
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service