• 1-412-329-7746

DITA 1.3 overview

  • DITA 1.3 overview

    DITA 1.3 isn’t the rowdy gathering that DITA 1.2 was—it’s more a group of friends going out to the new pub downtown while being sure to get some designated drivers. This article describes the most important additions to DITA 1.3.
    Scoped keys

    In DITA 1.2, keys were always global. That is, a key could only use one value in a ditamap. If you needed a key to use two different values in different parts of a single ditamap file, you were out of luck.

    DITA 1.3 addresses this problem with the @keyscope attribute. The @keyscope attribute lets you constrain the value of a key to a specific part of the ditamap. In effect, you create a local key instead of a global key. This is useful for omnibus publications or for publications that are authored by multiple teams. For example, consider a widget repair manual that describes two different products. It needs to reference the prodinfo key, but with two different values. The @keyscope attribute supports this requirement.

    <map>

    <title>Widget Repair Manual</title>
    <topichead navtitle=”Widget A” keyscope=”Widget_A”>
    <keydef keys=”prodinfo” href=”prodinfo_a.dita”/>
    <topicref href=”maintenance_a.dita”/>
    </topichead>
    <topichead navtitle=”Widget B” keyscope=”Widget_B”>
    <keydef keys=”prodinfo” href=”prodinfo_b.dita”/>
    <topicref href=”maintenance_b.dita”/>
    </topichead>


    </map>

    Before DITA 1.3, this scenario required two different keys or separate publications for each widget. To reference a key within a specific scope, add a scope before the key name. For example, to explicitly reference Widget B’s product information, use Widget_B.prodinfo as the key value. If no scope is declared, the scope of the current topic is used instead.

    Share on Google+Tweet about this on TwitterShare on FacebookEmail this to someone

    Comments are closed.