DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion Multiselect Dialog for Controlled Attribute Values

  • billburns

    Multiselect Dialog for Controlled Attribute Values

    Participants 7
    Replies 8
    Last Activity 5 years, 5 months ago

    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
    [email protected] | http://www.healthwise.org
    208.331.6917 (office)  |  208.345.1897 (fax)

    Healthwise helps people make better health decisions.

    Reply

    billburns

    Reply to: Multiselect Dialog for Controlled Attribute Values

    Sorry, 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.

    Reply

    Derek Read

    Reply to: Multiselect Dialog for Controlled Attribute Values

    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.

    Reply

    Derek Read

    Reply to: Multiselect Dialog for Controlled Attribute Values

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

    Reply

    billburns

    Reply to: Multiselect Dialog for Controlled Attribute Values

    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.

    Reply

    Derek Read

    Reply to: Multiselect Dialog for Controlled Attribute Values

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

     
       
       
       
     

    Reply

    billburns

    Reply to: Multiselect Dialog for Controlled Attribute Values

    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
    [email protected] | http://www.healthwise.org
    208.331.6917 (office)  |  208.345.1897 (fax)

    Reply

    Derek Read

    Reply to: Multiselect Dialog for Controlled Attribute Values

    Just remove their entries from the ct_config.xml file.

    Reply

    billburns

    Reply to: Multiselect Dialog for Controlled Attribute Values

    That'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)

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support