Pages: 1
Print
Author Topic: Multiselect Dialog for Controlled Attribute Values  (Read 416 times)
billburns
Member

Posts: 5


« on: April 26, 2017, 04:32:21 PM »

I'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
bburns@healthwise.org | www.healthwise.org
208.331.6917 (office)  |  208.345.1897 (fax)

Healthwise helps people make better health decisions.
Logged
billburns
Member

Posts: 5


« Reply #1 on: April 26, 2017, 04:42:25 PM »

Sorry, using Author Enterprise version 9.

Bill Burns
Content Architect | Healthwise
bburns@healthwise.org | www.healthwise.org
208.331.6917 (office)  |  208.345.1897 (fax)

Healthwise helps people make better health decisions.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2470



WWW
« Reply #2 on: April 26, 2017, 05:32:07 PM »

Is 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.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2470



WWW
« Reply #3 on: April 26, 2017, 06:02:51 PM »

Screenshots 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).


* conditional text..jpg (483.03 KB, 3000x2197 - viewed 37 times.)
Logged
billburns
Member

Posts: 5


« Reply #4 on: April 27, 2017, 08:38:49 AM »

Thanks, 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.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2470



WWW
« Reply #5 on: April 27, 2017, 12:04:23 PM »

Though 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):

 <attribute name="foo" title="foo nice name">
    <value name="myvalue1" title="value (nice name) 1" />
    <value name="myvalue2" title="value (nice name) two" />
    <value name="myvalue3" title="value (nice name) 3" />
  </attribute>
Logged
billburns
Member

Posts: 5


« Reply #6 on: April 27, 2017, 12:27:56 PM »

Looks 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
bburns@healthwise.org | www.healthwise.org
208.331.6917 (office)  |  208.345.1897 (fax)
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2470



WWW
« Reply #7 on: April 27, 2017, 12:54:23 PM »

Just remove their entries from the ct_config.xml file.
Logged
billburns
Member

Posts: 5


« Reply #8 on: April 27, 2017, 02:06:49 PM »

That's what I was hoping you'd say.

Thanks,


Bill Burns
Content Architect | Healthwise
bburns@healthwise.org | www.healthwise.org
208.331.6917 (office)  |  208.345.1897 (fax)
Logged
Pages: 1
Print
Jump to:  

email us