Home Forums DITA and XMetaL Discussion Creating a conditional inside a conref Reply To: Creating a conditional inside a conref

Derek Read

Reply to: Creating a conditional inside a conref

Conditional text will do this for you. You just need to decide which conditional text attribute makes the most sense for your usage. My first instinct would be to use @product, but that is really intended to produce different outputs for similar but different products.

In your case you could use any of the standard ones, including @otherprops. See the DITA Language Reference topic

Here's your DITA rewritten to use the otherprops conditional text attribute:

The Product Order API section provides the necessary response.

Then when you produce your output you would create a ditaval file that says “include” @otherprops=”product” and “exclude @otherprops=”order” (or the opposite, or both, or neither). XMetaL can be configured so that it will display a dialog for you to pick from and will then automatically generate the ditaval file for you based on your choices.

If you configure XMetaL's conditional text feature you can then set conditional text values and generate output based on them by selecting radio buttons in dialogs:

1) You can use the first two items on the Reuse menu to:
  a) Set conditional text value(s) for the current element.
  b) Style contional text so that the background of different elements with different conditional text values appear with colours of your choosing.

2) When you generate output you can select the button labelled Show/Hide Conditional Text to change your output based on these values and have XMetaL automatically generate the right ditaval file settings for you.

See these help topics:
Conditional text
 Creating and modifying conditions
 Apply a condition
 Show conditional text in previews and output
 Style conditional text

Reply

Products
Downloads
Support