Show action buttons only when valid
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 22
- Joined: Fri Aug 09, 2013 11:03 am
Show action buttons only when valid
Hi guys,
I'm wondering if there is a way to make toolbar buttons active only when the action they represent is valid based on the XSD?
For example in Author mode, the completion menu that comes with an "Enter" keypress shows only the tags that are valid to be inserted at the current location. If my action is just inserting a tag, is there a simple way to make its toolbar button active/inactive the same way, i.e. based on the existing XSD only, without writing extra Xpath conditions?
Thanks!
Yann
I'm wondering if there is a way to make toolbar buttons active only when the action they represent is valid based on the XSD?
For example in Author mode, the completion menu that comes with an "Enter" keypress shows only the tags that are valid to be inserted at the current location. If my action is just inserting a tag, is there a simple way to make its toolbar button active/inactive the same way, i.e. based on the existing XSD only, without writing extra Xpath conditions?
Thanks!
Yann
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Show action buttons only when valid
Post by alex_jitianu »
Hello Yann,
As you already discovered each action has some XPath conditions that control whether it's active or not in a given context. Right now the only solution for your use case is writing XPath expressions to identify each context where the action is active.
In the next version of Oxygen (15.1) which will be released in 1 or 2 months, you will be able to use in these XPath expressions a new function: oxy_allows-child-element(). This function basically checks the schema constraints so an action will only be active if an element is allowed in that context.
Best regards,
Alex
As you already discovered each action has some XPath conditions that control whether it's active or not in a given context. Right now the only solution for your use case is writing XPath expressions to identify each context where the action is active.
In the next version of Oxygen (15.1) which will be released in 1 or 2 months, you will be able to use in these XPath expressions a new function: oxy_allows-child-element(). This function basically checks the schema constraints so an action will only be active if an element is allowed in that context.
Best regards,
Alex
-
- Posts: 22
- Joined: Fri Aug 09, 2013 11:03 am
Re: Show action buttons only when valid
Thanks for the clear response Alex, appreciated.
Yann
Yann
alex_jitianu wrote:Hello Yann,
As you already discovered each action has some XPath conditions that control whether it's active or not in a given context. Right now the only solution for your use case is writing XPath expressions to identify each context where the action is active.
In the next version of Oxygen (15.1) which will be released in 1 or 2 months, you will be able to use in these XPath expressions a new function: oxy_allows-child-element(). This function basically checks the schema constraints so an action will only be active if an element is allowed in that context.
Best regards,
Alex
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Show action buttons only when valid
Hi,
As Alex said we added in Oxygen 15.1 that extension XPath function:
http://www.oxygenxml.com/doc/ug-oxygen/ ... ement.html
Regards,
Radu
As Alex said we added in Oxygen 15.1 that extension XPath function:
http://www.oxygenxml.com/doc/ug-oxygen/ ... ement.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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