DITA and XMetaL Discussion
XMetaL Community Forum › DITA and XMetaL Discussion › Multiselect Dialog for Controlled Attribute Values
-
billburns April 26, 2017 at 10:32 pm
Multiselect Dialog for Controlled Attribute Values
April 26, 2017 at 10:32 pmParticipants 7Replies 8Last Activity 5 years, 9 months agoI've specialized an attribute, and I need to be able to control the values that can be populated and allow multiple space-delimited values. I defined the list using type NMTOKENS. When I try to apply a value, I get a drop-down list. Is there any way to customize this behavior?
Thanks,
Bill Burns
Content Architect | Healthwise
[email protected] | http://www.healthwise.org
208.331.6917 (office) | 208.345.1897 (fax)Healthwise helps people make better health decisions.
billburns April 26, 2017 at 10:42 pm
Reply to: Multiselect Dialog for Controlled Attribute Values
April 26, 2017 at 10:42 pmSorry, using Author Enterprise version 9.
Bill Burns
Content Architect | Healthwise
[email protected] | http://www.healthwise.org
208.331.6917 (office) | 208.345.1897 (fax)Healthwise helps people make better health decisions.
Derek Read April 26, 2017 at 11:32 pm
Reply to: Multiselect Dialog for Controlled Attribute Values
April 26, 2017 at 11:32 pmIs this attribute meant to be used like the DITA conditional text attributes @audience, @platform, @product, or @otherprops?
In other words, is the attribute you have specialized based on @props?
If so, you can configure the conditional text feature so that your attribute will work alongside the standard DITA conditional text attributes (listed above). See Help > Creating and modifying conditions (or search for “modifying conditions” or “ct_config.xml”).
This enables a “…” button in the Attribute Inspector for conditional text attributes that opens a dialog that lets you select the values you have defined (in the ct_config.xml file). You can also access the same dialog via the Reuse menu by selecting “Apply / Remove Conditions” or by right clicking on any element and selecting “Apply / Remove Conditions”. The Reuse menu contains another dialog that lets you configure how elements with specific attributes and values set appear using the “Style Conditional Text” option.
Or perhaps this is not a specialized DITA DTD? It sounds like you might be modifying the DTDs according to the XML specification (if you are creating attributes using NMTOKEN) and not DITA's more specific specialization rules. I guess we'd need to see it to be sure.
Derek Read April 27, 2017 at 12:02 am
Reply to: Multiselect Dialog for Controlled Attribute Values
April 27, 2017 at 12:02 amScreenshots of XMetaL Author Enterprise 9 and 12 showing their respective “Apply / Remove Conditions” dialogs for setting DITA conditional text attributes (default sample attribute values are listed).
billburns April 27, 2017 at 2:38 pm
Reply to: Multiselect Dialog for Controlled Attribute Values
April 27, 2017 at 2:38 pmThanks, Derek. It's actually an @base specialization. If only it were props! I am sort of skirting the rules by changing CDATA to NMTOKEN. We have to control the values in some fashion. If this approach doesn't work, we'd like to build some kind of customization to control them without the constraint in our shells. So in either case, we'll still need a control for multiple value selections.
Derek Read April 27, 2017 at 6:04 pm
Reply to: Multiselect Dialog for Controlled Attribute Values
April 27, 2017 at 6:04 pmThough not designed for this, you could try to piggyback on the standard conditional text feature and configure the dialog so it lets you set your values for this other attribute.
Assuming your attribute is named “foo” you could just add something like this to the ct_config.xml file (and remove or change anything else that you don't want):
billburns April 27, 2017 at 6:27 pm
Reply to: Multiselect Dialog for Controlled Attribute Values
April 27, 2017 at 6:27 pmLooks like hit preview on the last try.
Can I suppress the standard profiling attributes? I don't think we're using conditions at all.
Thanks,
Bill Burns
Content Architect | Healthwise
[email protected] | http://www.healthwise.org
208.331.6917 (office) | 208.345.1897 (fax)Derek Read April 27, 2017 at 6:54 pm
Reply to: Multiselect Dialog for Controlled Attribute Values
April 27, 2017 at 6:54 pmJust remove their entries from the ct_config.xml file.
billburns April 27, 2017 at 8:06 pm
Reply to: Multiselect Dialog for Controlled Attribute Values
April 27, 2017 at 8:06 pmThat's what I was hoping you'd say.
Thanks,
Bill Burns
Content Architect | Healthwise
[email protected] | http://www.healthwise.org
208.331.6917 (office) | 208.345.1897 (fax) -
AuthorPosts
- You must be logged in to reply to this topic.