How to filterRNG Schema Annotation Hover Help
Oxygen general issues.
-
- Posts: 72
- Joined: Thu Mar 26, 2015 4:57 pm
How to filterRNG Schema Annotation Hover Help
Post by steve.cuzner »
I'm working with a docbook and when I hover over an element I get the annotations from the RNG schema for that element, which is great. However, I get all the annotations for that element regardless of context. Take the info element which is used in multiple patterns for multiple contexts (info in book, info in chapter, info in sections, etc.) So the hover help looks like:
A wrapper for information about a component or other block
A wrapper for information about a component or other block with a required title
A wrapper for information about a component or other block with only a title
A wrapper for information about a component or other block with only a required title
A wrapper for information about a component or other block without a title
This is complicated when I add my customization layer on top of docbook and extend info to meet my requirements. Now the hover help gives my custom annotations plus the annotations from core docbook that may or may not be accurate. Is there a way to filter out the hover help to display annotations for the pattern that is the current validation context? Also, is there a way to specify that the hover help source come from a custom namespace, that way I could disgard items from the a: namespace and instead use my own annotation namespace?
Steve
A wrapper for information about a component or other block
A wrapper for information about a component or other block with a required title
A wrapper for information about a component or other block with only a title
A wrapper for information about a component or other block with only a required title
A wrapper for information about a component or other block without a title
This is complicated when I add my customization layer on top of docbook and extend info to meet my requirements. Now the hover help gives my custom annotations plus the annotations from core docbook that may or may not be accurate. Is there a way to filter out the hover help to display annotations for the pattern that is the current validation context? Also, is there a way to specify that the hover help source come from a custom namespace, that way I could disgard items from the a: namespace and instead use my own annotation namespace?
Steve
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to filterRNG Schema Annotation Hover Help
Hi Steve,
Thanks for the report. We know about the situation but it's quite difficult to obtain the context of the element when extracting the annotation. We'll look into this more on our side though.
One possibility would be to avoid using the annotations from the schema completely for some elements:
https://www.oxygenxml.com/doc/versions/ ... tions.html
As an example, if you look inside the XML file: OXYGEN_INSTALL_DIR\frameworks\docbook\styleguide\contentCompletionElementsMap.xml
it maps various Docbook elements to links to the specification. These are the links that you see when hovering over various elements.
But you can also map Docbook elements to a fixed annotation content, thus bypassing the schemas completely, something like:
so that Oxygen will look in a folder called "descriptions" located in the same parent folder for a file called "info.html" and will use its content as an annotation for the "info" element, no matter in what context it is placed.
Regards,
Radu
Thanks for the report. We know about the situation but it's quite difficult to obtain the context of the element when extracting the annotation. We'll look into this more on our side though.
One possibility would be to avoid using the annotations from the schema completely for some elements:
https://www.oxygenxml.com/doc/versions/ ... tions.html
As an example, if you look inside the XML file: OXYGEN_INSTALL_DIR\frameworks\docbook\styleguide\contentCompletionElementsMap.xml
it maps various Docbook elements to links to the specification. These are the links that you see when hovering over various elements.
But you can also map Docbook elements to a fixed annotation content, thus bypassing the schemas completely, something like:
Code: Select all
.........
<mappingGroup xml:base="descriptions/">
................
<mapping elementName="info" path="info.html" type="content"/>
..............
</mappingGroup>
.............
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 72
- Joined: Thu Mar 26, 2015 4:57 pm
Re: How to filterRNG Schema Annotation Hover Help
Post by steve.cuzner »
Thanks, Radu, this will help.
Can the xml:base attribute be used on the mapping element rather than the mappingGroup for more fine tuned control?
Might I suggest that a possible enhancement (I'll cross post to the other list) would be to modify the Preference Editor->Content Completion->Annotations->Use all Relax NG annotations as documentation from a check box to a list of namespaces and/or tags to use for annotations. This would allow a developer to ignore the http://relaxng.org/ns/compatibility/annotations/1.0 annotations and then use annotations from a custom namespace.
Steve
Can the xml:base attribute be used on the mapping element rather than the mappingGroup for more fine tuned control?
Might I suggest that a possible enhancement (I'll cross post to the other list) would be to modify the Preference Editor->Content Completion->Annotations->Use all Relax NG annotations as documentation from a check box to a list of namespaces and/or tags to use for annotations. This would allow a developer to ignore the http://relaxng.org/ns/compatibility/annotations/1.0 annotations and then use annotations from a custom namespace.
Steve
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to filterRNG Schema Annotation Hover Help
Hi Steve,
The xml:base can be added also on the mapping element.
I see you already posted about the improvement that you want, we'll probably discuss on that thread.
Regards,
Radu
The xml:base can be added also on the mapping element.
I see you already posted about the improvement that you want, we'll probably discuss on that thread.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to filterRNG Schema Annotation Hover Help
Hi Steve,
One more thing, based on your feedback I already started generating (for Oxygen 18.0 which will be released in Spring) small HTML descriptions for all Docbook elements, so if you drop us an email at support@oxygenxml.com I could give you the exact changes to perform on your side.
Regards,
Radu
One more thing, based on your feedback I already started generating (for Oxygen 18.0 which will be released in Spring) small HTML descriptions for all Docbook elements, so if you drop us an email at support@oxygenxml.com I could give you the exact changes to perform on your side.
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)
- ↳ 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