OASIS Darwin Information Typing Architecture (DITA) TC

 View Only
  • 1.  Question about conref and generalization

    Posted 09-24-2024 10:24
    Good morning and happy conref...

    I wanted to raise a comment that Eliot made in the latest review for discussion at the TC. Specifically, about this language:

    "As with @conref, if the @conrefend references a more specialized version of the referencing element, applications should generalize the target when resolving."

    Eliot recommends removing this rule: "I've never liked this particular rule because it assumes a particular processing result, namely literal generation of new DITA source. Generalization is only necessary if the resolved result is goingto be processed using grammar-aware processing, otherwise, there's not reason at all to do it."

    To make the rule a little clearer before we discuss – an example of this rule in action would be a list item that uses conref to pull in content from a step. This is legal, because step is a more specialized list item; the rules of specialization say that step can limit what went into a list item, but cannot expand it, so any base element in the step is allowed in the list item. For example:

    <li conref="mytask.dita#task/step"></li>
    ....
    <step id="step">
      <cmd>Sample step here<cmd>
      <info>It shows how things work</info>
    </step>

    In this case – resolving the conref pulls a step into a basic task that would not otherwise allow a step. The generalization rule says that the step element should be generalized – turning the step into a list item, the command into a phrase, and the info into a division. The generalized result would be:
    <li>
      <ph>Sample step here</ph>
      <div>It shows how things work</div>
    </li>

    If the rule is removed, there would be no suggestion to generalize the content. The only impact I can think of is that a common rendering tool might have extra rules for step, so that you end up rendering something odd in a normal topic that wouldn't normally be allowed or looks out of place. But – I think even using conref like this is such an uncommon case that it is worth considering whether this rule is useful.


    Thanks,
    Robert


  • 2.  RE: Question about conref and generalization

    Posted 09-29-2024 16:12

    Note that even when you generalize you are not changing the @class values, only the tag names of the elements.

     

    This means that if you apply processing or styling rules against @class values, the processed result may not change even if the markup is literally generalized.

     

    So this rule can't be motivated by processing concerns, only validation concerns and those seem to be of dubious value at best (that is, who would actually bother to validate the resolved result?).

     

    In the early days we had the idea that there would be a lot of loosely-coupled interchange, where generalization might come into play, including for content that is subsequently further authored. In that context, it makes more sense that validation of resolved results might be a real concern.

     

    But that degree of interchange has not yet materialized as a general practice and so the concern does not occur in practice.

     

    As we have eliminated all the declarative features that served to help constrain content references (@domains, etc.) it just doesn't seem necessary or necessarily even appropriate to maintain this rule (especially considering that it's not normative).

     

    Cheers,

     

    E.

     

    _____________________________________________

    Eliot Kimber

    Sr. Staff Content Engineer

    O: 512 554 9368

     

    servicenow

     

    servicenow.com

    LinkedIn | X | YouTube | Instagram