Automatically set @keys attribute for new topics
Are you missing a feature? Request its implementation here.
-
- Posts: 922
- Joined: Thu May 02, 2019 2:32 pm
Automatically set @keys attribute for new topics
Post by chrispitude »
An increasingly common DITA best-practice is to define @keys values for all topic references, then use keyrefs instead of hrefs for references to topics and their contents.
Currently, users must remember to set the @keys value each time they create a new topic in the map. This is error-prone.
It would be great if Oxygen could provide an option to set this automatically:
Currently, users must remember to set the @keys value each time they create a new topic in the map. This is error-prone.
It would be great if Oxygen could provide an option to set this automatically:
new_topic_keys.png
You do not have the required permissions to view the files attached to this post.
-
- Posts: 9436
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Automatically set @keys attribute for new topics
Hi Chris,
Thanks for the suggestion, based on a previous request of yours we have an issue logged with ID EXM-40196.
We'll update this forum thread when the issue is implemented.
Regards,
Radu
Thanks for the suggestion, based on a previous request of yours we have an issue logged with ID EXM-40196.
We'll update this forum thread when the issue is implemented.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 417
- Joined: Mon May 09, 2016 9:37 am
Re: Automatically set @keys attribute for new topics
Post by sorin_carbunaru »
Hello Chris,
It's been done in Oxygen 22.1. You can find some more info at https://www.oxygenxml.com/doc/versions/ ... opics.html (look for Use the file name as the value of the "keys" attribute for topic references).
Best wishes,
Sorin Carbunaru
oXygen XML
It's been done in Oxygen 22.1. You can find some more info at https://www.oxygenxml.com/doc/versions/ ... opics.html (look for Use the file name as the value of the "keys" attribute for topic references).
Best wishes,
Sorin Carbunaru
oXygen XML
-
- Posts: 922
- Joined: Thu May 02, 2019 2:32 pm
Re: Automatically set @keys attribute for new topics
Post by chrispitude »
Hello! We're using Oxygen v23. (Impressive release, by the way!)
I noticed something interesting today. The DITA > Maps > Use file name as the value of the "keys" attribute setting affects <mapref> elements as well as <topicref> elements. For example, if I add a peer map reference (@scope="peer", @processing-role="resource-only", @keyscope defined):
then the resulting <mapref> also has @keys defined:
which I can confirm by going back into Edit Properties:
But even if I delete the mapref's @keys value there, it gets recreated when I exit the Edit Properties dialog.
I understand the use of having a topicref with @keys, but not a mapref with @keys. Is this a useful behavior to have? What does it allow me to do? Is it harmless, or could it cause an unintentional key namespace collision?
Thanks!
I noticed something interesting today. The DITA > Maps > Use file name as the value of the "keys" attribute setting affects <mapref> elements as well as <topicref> elements. For example, if I add a peer map reference (@scope="peer", @processing-role="resource-only", @keyscope defined):
image.png
then the resulting <mapref> also has @keys defined:
image.png
which I can confirm by going back into Edit Properties:
image.png
But even if I delete the mapref's @keys value there, it gets recreated when I exit the Edit Properties dialog.
I understand the use of having a topicref with @keys, but not a mapref with @keys. Is this a useful behavior to have? What does it allow me to do? Is it harmless, or could it cause an unintentional key namespace collision?
Thanks!
You do not have the required permissions to view the files attached to this post.
-
- Posts: 417
- Joined: Mon May 09, 2016 9:37 am
Re: Automatically set @keys attribute for new topics
Post by sorin_carbunaru »
Hi Chris!
The <mapref> element is, in the end, just a convenience element that is equivalent to a <topicref> with the @format attribute set to "ditamap". Therefore, I would say it's normal for the <mapref> to also get a @keys attribute, just like other references do. You can later use the key name to refer the map using @keyref. And I don't think it's harmful.
In regards to the fact that you cannot remove the key using the "Edit Properties" dialog, I am afraid I cannot reproduce this behavior... After I click OK, the @keys attribute is removed.
Best wishes,
Sorin Carbunaru
The <mapref> element is, in the end, just a convenience element that is equivalent to a <topicref> with the @format attribute set to "ditamap". Therefore, I would say it's normal for the <mapref> to also get a @keys attribute, just like other references do. You can later use the key name to refer the map using @keyref. And I don't think it's harmful.
In regards to the fact that you cannot remove the key using the "Edit Properties" dialog, I am afraid I cannot reproduce this behavior... After I click OK, the @keys attribute is removed.
Best wishes,
Sorin Carbunaru
-
- Posts: 922
- Joined: Thu May 02, 2019 2:32 pm
Re: Automatically set @keys attribute for new topics
Post by chrispitude »
Hi Sorin,
I found that the key is removed if you delete it and hit OK, but it comes back if you go back into the editing window and make some other change (or even nothing, as shown below) then hit OK:
If this is a bug, it's a very minor one. I'll leave it to you to decide whether you want to file it. This behavior is not causing us any issues.
I found that the key is removed if you delete it and hit OK, but it comes back if you go back into the editing window and make some other change (or even nothing, as shown below) then hit OK:
key_redefined.gif
If this is a bug, it's a very minor one. I'll leave it to you to decide whether you want to file it. This behavior is not causing us any issues.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 417
- Joined: Mon May 09, 2016 9:37 am
Re: Automatically set @keys attribute for new topics
Post by sorin_carbunaru »
Hi Chris,
Now I am able to reproduce the bug. Thank you for the info! I created EXM-47008
.
All the best,
Sorin C.
Now I am able to reproduce the bug. Thank you for the info! I created EXM-47008

All the best,
Sorin C.
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