Tagging a variable
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 37
- Joined: Tue Apr 13, 2021 9:48 pm
Tagging a variable
Post by Jeff_Reynolds »
Hi everyone!
I don't seem to be able to wrap a variable with wintitle or uicontrol tags. In this example, I have a window title that I conref in, and once injected into the para I can't wrap additional tags around it. Any tips?
I don't seem to be able to wrap a variable with wintitle or uicontrol tags. In this example, I have a window title that I conref in, and once injected into the para I can't wrap additional tags around it. Any tips?
Code: Select all
The <wintitle><ph keyref="am_module"/></wintitle> window
You do not have the required permissions to view the files attached to this post.
-
- Posts: 9421
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Tagging a variable
Hi Jeff,
I'm afraid according to the DITA 1.3 specification the <wintitle> element can contain either text content or the <text> element inside it:
https://www.oxygenxml.com/dita/1.3/spec ... __wintitle
But it does allow specifying the @keyref attribute directly on it like:
Regards,
Radu
I'm afraid according to the DITA 1.3 specification the <wintitle> element can contain either text content or the <text> element inside it:
https://www.oxygenxml.com/dita/1.3/spec ... __wintitle
But it does allow specifying the @keyref attribute directly on it like:
Code: Select all
<wintitle keyref="ABC"/>
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 922
- Joined: Thu May 02, 2019 2:32 pm
Re: Tagging a variable
Post by chrispitude »
<uicontrol> allows <keyword>:
However, <wintitle> does not allow <keyword>:
so we use this form to decouple the element semantic intent from the variable reference:uicontrol = element uicontrol { (text | data | sort-as | data-about | foreign | unknown | keyword | apiname | option | parmname | cmdname | msgnum | varname | wintitle | numcharref | parameterentity | textentity | xmlatt | xmlelement | xmlnsname | xmlpi | term | abbreviated-form | \text | image | shortcut)+ }
Code: Select all
<uicontrol><keyword keyref="Product"/></uicontrol>
so we use Radu's suggested form.wintitle = element wintitle { (text | \text)+ }
-
- Posts: 922
- Joined: Thu May 02, 2019 2:32 pm
Re: Tagging a variable
Post by chrispitude »
Hi Radu,
I was going to suggest to simply double-click the variable in the DITA Reusable Components view and let Oxygen figure out that <keyword> is valid in <uicontrol>, but instead this happens:
It might be useful to have DITA Reusable Components to prefer variable-like elements (<ph>, <keyword>, ...?) before the first alphanumeric match when inserting text variables.
Here's a testcase:
I was going to suggest to simply double-click the variable in the DITA Reusable Components view and let Oxygen figure out that <keyword> is valid in <uicontrol>, but instead this happens:
image.png
It might be useful to have DITA Reusable Components to prefer variable-like elements (<ph>, <keyword>, ...?) before the first alphanumeric match when inserting text variables.
Here's a testcase:
oxygen_variable_insertion_in_uicontrol.zip
You do not have the required permissions to view the files attached to this post.
-
- Posts: 37
- Joined: Tue Apr 13, 2021 9:48 pm
Re: Tagging a variable
Post by Jeff_Reynolds »
Thanks everyone for the responses. Another item to add to my reuse "to do" list. I'm in week 2 of CIDM's Advanced Reuse course so this information is very timely.
Cheers!
Cheers!
-
- Posts: 9421
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Tagging a variable
Hi Chris,
I agree with your take about the double click behavior in the DITA Reusable Components view, I added an internal issue to improve it:
EXM-50563 Improve insertion strategy for double clicking a key in the DITA Reusable Components view
But in this case I think we should insert a ph with keyref instead of a keyword. There would be an entire discussion about whether we should insert ph or keyword with keyref. We have another internal issue for that as well:
EXM-40036 Control default added keyref element name in "DITA Reusable Components" view
I would incline towards inserting ph with keyref:
post43869.html#p43869
Regards,
Radu
I agree with your take about the double click behavior in the DITA Reusable Components view, I added an internal issue to improve it:
EXM-50563 Improve insertion strategy for double clicking a key in the DITA Reusable Components view
But in this case I think we should insert a ph with keyref instead of a keyword. There would be an entire discussion about whether we should insert ph or keyword with keyref. We have another internal issue for that as well:
EXM-40036 Control default added keyref element name in "DITA Reusable Components" view
I would incline towards inserting ph with keyref:
post43869.html#p43869
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 922
- Joined: Thu May 02, 2019 2:32 pm
Re: Tagging a variable
Post by chrispitude »
Hi Radu,
I also much prefer <ph keyref="..."/>, but I think <uicontrol> is an unusual case in which <keyword> is allowed but <ph> is not. (And <wintitle> is even more unusual in that neither is allowed!)
I recall that DITA 2.0 was potentially going to enhance the content models of these elements to allow <ph>, but I don't know if these enhancements are in the final plan of record.
I also much prefer <ph keyref="..."/>, but I think <uicontrol> is an unusual case in which <keyword> is allowed but <ph> is not. (And <wintitle> is even more unusual in that neither is allowed!)
I recall that DITA 2.0 was potentially going to enhance the content models of these elements to allow <ph>, but I don't know if these enhancements are in the final plan of record.
-
- Posts: 78
- Joined: Wed Jun 22, 2016 2:48 pm
Re: Tagging a variable
Post by adrian_sorop »
Hi,
Oxygen version 25.0 was just released.
The issue EXM-50563 Improve insertion strategy for double clicking a key in the DITA Reusable Components view was fixed.
The default action will insert a keyword when the destination element is an uicontrol
The Insert as Keyref action from contextual menu of DITA Reusable Components will now propose valid elments.
Regards,
Adrian S.
Oxygen version 25.0 was just released.
The issue EXM-50563 Improve insertion strategy for double clicking a key in the DITA Reusable Components view was fixed.
The default action will insert a keyword when the destination element is an uicontrol
The Insert as Keyref action from contextual menu of DITA Reusable Components will now propose valid elments.
Regards,
Adrian S.
Adrian Sorop
<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