Hide elements with content completion
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 3
- Joined: Thu Oct 30, 2014 2:43 pm
Hide elements with content completion
Hi,
Is it possible with the filter in the content completion to hide the <fig> element only within in <p>?
As both of them are block elements we don't want to let an author select the <fig> in a <p>.
Can this be done without an DTD change?
Best Regards
Joerg
Is it possible with the filter in the content completion to hide the <fig> element only within in <p>?
As both of them are block elements we don't want to let an author select the <fig> in a <p>.
Can this be done without an DTD change?
Best Regards
Joerg
-
- Posts: 9417
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Hide elements with content completion
Hi Joerg,
This could be done with a document type customization.
If in the Oxygen Preferences->Document Type Association page you edit the DITA document type:
1) In the Author->Content Completion tab you can add the fig element to the list of elements to remove completely.
2) Then in the Author->Actions tab you can define a new action with the name fig which has an activation XPath (which you can set something like not(ancestor-or-self::p)) and calls an operation, you can choose an existing implementation called ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation which inserts a certain XML fragment (for example <fig><title/></fig>).
3) Go back to the Author->Content Completion tab and add your new action to the list of content completion window entries.
Regards,
Radu
This could be done with a document type customization.
If in the Oxygen Preferences->Document Type Association page you edit the DITA document type:
1) In the Author->Content Completion tab you can add the fig element to the list of elements to remove completely.
2) Then in the Author->Actions tab you can define a new action with the name fig which has an activation XPath (which you can set something like not(ancestor-or-self::p)) and calls an operation, you can choose an existing implementation called ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation which inserts a certain XML fragment (for example <fig><title/></fig>).
3) Go back to the Author->Content Completion tab and add your new action to the list of content completion window entries.
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