Delete selected multiple elements
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 7
- Joined: Sat Sep 28, 2019 1:38 pm
Delete selected multiple elements
Hi,
We changed to display the definition list as table style.
And our writer requested to add the action to delete dlentry elements because the table style does not show dlentry elements corresponding to row.
I tried DeleteElementsOperation like this:
Xpath activation: ancestor-or-self::*[contains(@class," topic/dlentry ")]
elementLocations: ancestor-or-self::*[contains(@class," topic/dlentry ")]
However, this works if single dlentry is selected. If you select multiple dlentry or inside elements, the last dlentry is deleted.
How can I implement to delete multiple dlentry at once?
We changed to display the definition list as table style.
And our writer requested to add the action to delete dlentry elements because the table style does not show dlentry elements corresponding to row.
I tried DeleteElementsOperation like this:
Xpath activation: ancestor-or-self::*[contains(@class," topic/dlentry ")]
elementLocations: ancestor-or-self::*[contains(@class," topic/dlentry ")]
However, this works if single dlentry is selected. If you select multiple dlentry or inside elements, the last dlentry is deleted.
How can I implement to delete multiple dlentry at once?
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Delete selected multiple elements
Hi Edmonndo,
No matter how many nodes are selected in the Author mode, there is only one context node for the xpath expression execution.
Maybe you can try something like this for the "ElementLocations" parameter value:
so that you first go one level up to the parent of the current dlentry and then select all the child dlentry elements of the parent.
Regards,
Radu
No matter how many nodes are selected in the Author mode, there is only one context node for the xpath expression execution.
Maybe you can try something like this for the "ElementLocations" parameter value:
Code: Select all
parent::*/*[contains(@class," topic/dlentry ")]
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
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