Author component: Create an action to move a node
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 124
- Joined: Tue May 29, 2012 5:42 pm
Author component: Create an action to move a node
Post by sebastienlavandier »
Hi,
I have already create customized actions used with author component 14.2, for insert an xml fragment, delete a node ...
But now I want to create an action for moved up/down a node in author view, after have click on a up/down button.
I want to know, if an oxygen action already exist to do that ?
Else could you gave me the best way to do that ?
Thanks in advance for your help.
Regards
I have already create customized actions used with author component 14.2, for insert an xml fragment, delete a node ...
But now I want to create an action for moved up/down a node in author view, after have click on a up/down button.
I want to know, if an oxygen action already exist to do that ?
Else could you gave me the best way to do that ?
Thanks in advance for your help.
Regards
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Author component: Create an action to move a node
Post by alex_jitianu »
Hello,
Such a behavior is not possible to implement in an author author action (in a general fashion) by using only the existing author operations (an action consists in one or more operations). The good news is that such a move AuthorOperation can be implemented using the public API. Basically this operation must use the API from AuthorDocumentController to identify the node to move (by executing an XPath), create a document fragment over the node (AuthorDocumentController.createDocumentFragment()) and inserting the fragment at the destination (AuthorDocumentController.insertFragment()). Last, it must delete the original node (AuthorDocumentController.deleteNode())
We had previous requests for such an operation from our users and we decided to implement one ourselves. We have already started working on it in the current development stream. If you find it helpful, I can send you the source code for this operation (like I said, it uses public API) and you can tailor it some more, if required.
Best regards,
Alex
Such a behavior is not possible to implement in an author author action (in a general fashion) by using only the existing author operations (an action consists in one or more operations). The good news is that such a move AuthorOperation can be implemented using the public API. Basically this operation must use the API from AuthorDocumentController to identify the node to move (by executing an XPath), create a document fragment over the node (AuthorDocumentController.createDocumentFragment()) and inserting the fragment at the destination (AuthorDocumentController.insertFragment()). Last, it must delete the original node (AuthorDocumentController.deleteNode())
We had previous requests for such an operation from our users and we decided to implement one ourselves. We have already started working on it in the current development stream. If you find it helpful, I can send you the source code for this operation (like I said, it uses public API) and you can tailor it some more, if required.
Best regards,
Alex
-
- Posts: 124
- Joined: Tue May 29, 2012 5:42 pm
Re: Author component: Create an action to move a node
Post by sebastienlavandier »
Hi Alex,
Yes, if it's possible I want this source code.
I want to look for Oxygen API best practices.
Thank you for your quick answer too.
Regards.
Yes, if it's possible I want this source code.
I want to look for Oxygen API best practices.
Thank you for your quick answer too.
Regards.
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