Plugin development - XPath on current document.
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Plugin development - XPath on current document.
Post by sorin_ristache »
Hello,
In the current version (Author version 10.0) running an XPath query in a custom extension is not possible. It would be possible if the nodes of the Author document were exposed in the Author API but that is an enhancement for a future version.
Regards,
Sorin
In the current version (Author version 10.0) running an XPath query in a custom extension is not possible. It would be possible if the nodes of the Author document were exposed in the Author API but that is an enhancement for a future version.
Regards,
Sorin
-
- Posts: 22
- Joined: Wed Jul 30, 2008 12:46 am
Re: Plugin development - XPath on current document.
Hi Guys,
As my development of Author Extensions continues, I'm repeatedly being limited in what I can do due to the lack of xPath functionality in the api.
- Do you guys have a planned release version in which I might expect xPath functionality on the current document from my java author extensions?
- Do you have any further suggestions about how I may achieve the same functionality within the current scope of the 10.0 api?
I'm currently using an overly complex system of start and end node offsets and temporary <marker/> tags to navigate around the document.
Any help, or an estimated release version and date would be greatly appreciated.
Thanks for your continuing help and attention with this matter.
Cal.
As my development of Author Extensions continues, I'm repeatedly being limited in what I can do due to the lack of xPath functionality in the api.
- Do you guys have a planned release version in which I might expect xPath functionality on the current document from my java author extensions?
- Do you have any further suggestions about how I may achieve the same functionality within the current scope of the 10.0 api?
I'm currently using an overly complex system of start and end node offsets and temporary <marker/> tags to navigate around the document.
Any help, or an estimated release version and date would be greatly appreciated.
Thanks for your continuing help and attention with this matter.
Cal.
-
- Posts: 63
- Joined: Fri Dec 12, 2003 6:34 pm
- Contact:
Re: Plugin development - XPath on current document.
Post by iulian_velea »
As Sorin noted in his post, currently there is no API available for executing an XPath query from your extension.
You probably are familiar with the current API for navigating in the AuthorDocument and the other functionality we are providing for executing various operations on the document.
The main classes that should be looked at in my opinion are:
and
It would be helpful if you could describe what you need to do more exactly.
Best wishes,
Iulian
You probably are familiar with the current API for navigating in the AuthorDocument and the other functionality we are providing for executing various operations on the document.
The main classes that should be looked at in my opinion are:
Code: Select all
ro.sync.ecss.extensions.api.AuthorAccess
Code: Select all
ro.sync.ecss.extensions.api.AuthorDocumentController
Best wishes,
Iulian
-
- Posts: 22
- Joined: Wed Jul 30, 2008 12:46 am
Re: Plugin development - XPath on current document.
Hey Iulian,
What I'm trying to do is grab the children of a node as a "snippet" of XML text. For example, to get the "snippet" children of "clause" given the source:
I would want a string that reads
I have scoured both the AuthorAccess and AuthorDocumentController API's to no avail. A query like this would be very simple to execute with xPath.
Is this functionality scheduled to be released in an future version of oXygen?...and if so, is there an anticipated release date?
I have many more scenario's in which xPath functionality would be required to perform the tasks I need to complete, and I'm desperate to find a solution to this problem.
Thanks for your help.
Cal.
What I'm trying to do is grab the children of a node as a "snippet" of XML text. For example, to get the "snippet" children of "clause" given the source:
Code: Select all
<clause>
<num/>
<text id='123'>three <item id='456'>nuts</item></text>
</clause>
Code: Select all
"<num/><text id='123'>three <item id='456'>nuts</item></text>"
Is this functionality scheduled to be released in an future version of oXygen?...and if so, is there an anticipated release date?
I have many more scenario's in which xPath functionality would be required to perform the tasks I need to complete, and I'm desperate to find a solution to this problem.
Thanks for your help.
Cal.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Plugin development - XPath on current document.
Post by sorin_ristache »
Hello,
Regards,
Sorin
This functionality is scheduled for version 10.1 which will be released probably in February 2009.calvados wrote:Is this functionality scheduled to be released in an future version of oXygen?...and if so, is there an anticipated release date?
If you cannot wait until Oxygen version 10.1 you can execute an XPath expression on a DOM tree that you can build by wrapping each node of the Author document in a DOM node. The nodes of the Author document can be obtained with methods of classes ro.sync.ecss.extensions.api.AuthorAccess and ro.sync.ecss.extensions.api.AuthorDocumentController. For example you can find the root of the Author document with the methods AuthorAccess.getDocumentController(), AuthorDocumentController.getNodeAtOffset(), AuthorNode.getParent() (you can call getParent() recursively) and AuthorElement.getContentNodes(). The AuthorNode objects from the Author document that represent XML elements of your document (for example <num/>, <text id='123'>three <item id='456'>nuts</item></text>, etc) are also AuthorElement objects so you can call AuthorElement.getContentNodes() to find the child nodes and wrap them in DOM nodes.calvados wrote:I have many more scenario's in which xPath functionality would be required to perform the tasks I need to complete, and I'm desperate to find a solution to this problem.
Regards,
Sorin
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