Loading ...
Sorry, an error occurred while loading the content.

Re: [dita-users] Re: Conditional text for elements allowed only once

Expand Messages
  • Eliot Kimber
    One challenge with DITA is that the base content models need to be reasonably constrained so that authoring is not nuts. But this means that in places where
    Message 1 of 5 , Jun 1, 2013
    • 0 Attachment
      One challenge with DITA is that the base content models need to be
      reasonably constrained so that authoring is not nuts. But this means that in
      places where there should only be one of something that you cannot have
      multiple instances with different conditions. <desc> within <fig> is such a
      case.

      More generally, any time an element occurs within a sequence group, if that
      element should not be repeatable logically (that is, it would only be
      sensible to have at most one instance that gets processed), then it cannot
      be allowed to repeat in the base content model.

      Conceptually it would make sense to allow multiple <desc> instances *as long
      as* each instance had mutually-exclusive conditions *and* you always applied
      filtering.

      But of course, there's no way to guarantee that both of those conditions
      will always hold, so the base content models only allow a single <desc>
      element.

      The alternative would be to allow all elements within sequence groups to
      repeat, but then authors would repeat things that should not occur multiple
      times after filtering is applied.

      In most, if not all, of these cases, the element allows child elements that
      can be repeated and that can thus provide the conditionality required, e.g.,
      <ph> within <desc> as others suggested.

      Cheers,

      Eliot

      On 5/31/13 10:42 AM, "Bryon Thomas" <risingmoonbt@...> wrote:

      > Thanks, I suspected it might be that. I'm always hesitant to add p or ph tags.
      > Still learning through how dita ot interprets classes.
      >
      > Bryon
      >
      > --- In dita-users@yahoogroups.com <mailto:dita-users%40yahoogroups.com> ,
      > Shane Taylor <shanetaylortext@...> wrote:
      >>
      >> You could put the conditional attribute on a <ph> or other element within
      >> <desc>. OR, you could make the <fig> itself conditional. From your example,
      >> it sounds like the latter approach might be your best bet as the image
      >> itself presumably is also different.
      >>
      >>
      >> On Fri, May 31, 2013 at 8:40 AM, Bryon Thomas <risingmoonbt@...>wrote:
      >>
      >>> **
      >>>
      >>>
      >>> Can you have a fig with conditional descriptions? For instance:
      >>> <fig>
      >>> <desc audience="expert"> Experts should see this. </desc>
      >>> <desc audeince="novice"> A Novice should see this. </desc>?
      >>> </fig>
      >>>
      >>> Oxygen shows this as an error because description is only allowed once in
      >>> the fig element. How would you profile this, or would you change it to a
      >>> different element?
      >>>
      >>> Thank you.
      >>>
      >>>
      >>>
      >>
    Your message has been successfully submitted and would be delivered to recipients shortly.