OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

dita message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [dita-comment] Key definition with key reference


It looks to me like the question is the expected behavior in the following situation:

 

               Keydef 1 refers to keydef 2.

               In keydef 2, one or more child elements are defined.

               The child elements that are defined in keydef 2 are NOT defined in keydef 1.

 

What is expected in the resolved output?

 

The example is clear that attributes and their values that are defined in keydef 2 but are missing in keydef 1 are included in the resolved output, but that the values of existing attributes in keydef 1 override the values of these attributes in keydef 2. It is also clear that the value of the existing child element keydef 1 overrides the value of the corresponding element in keydef 2.

 

The example does not illustrate the similar case with a child element missing from keydef 1 but included in keydef 2. So if I have the following DITA source:

 

<map>

        <topicref keyref="widget" id="example"/>

        <keydef keys="widget" href="" scope="local" format="dita" rev="v1r2"

            keyref="mainProduct">

            <topicmeta><navtitle>Information about Widget</navtitle></topicmeta>

        </keydef>

        <keydef keys="mainProduct" href="" scope="external" format="html"

            product="prodCode" audience="sysadmin">

            <topicmeta><navtitle>Generic product page</navtitle>

                <keywords>

                    <keyword>gadgets</keyword>

                </keywords></topicmeta>

        </keydef>

    </map>

 

Following the behavior of attributes, I would expect that the âgadgetsâ keyword would be included in the resolved output:

 

<map>

    <topicref id="example"

        href="" scope="local" format="dita" rev="v1r2"

        product="prodCode" audience="sysadmin">

        <topicmeta><navtitle>Information about Widget</navtitle>

        <keywords><keyword>gadgets</keyword></keywords></topicmeta>

    </topicref>

</map>

 

But the text and example are not clear that elements behave the same way as attributes in this situation.

 

We should improve the clarity of the example, both in the text and in the example code. But first we must establish whether elements do behave the same way as attributes when one key refers to another.

 

Bob

 

From: dita@lists.oasis-open.org <dita@lists.oasis-open.org> On Behalf Of Kristen James Eberlein
Sent: Tuesday, August 8, 2023 7:31 PM
To: DITA Technical Committee (dita@lists.oasis-open.org) <dita@lists.oasis-open.org>
Subject: [dita] FW: [dita-comment] Key definition with key reference

 

Caution! This email originated outside of JANACORP. Please do not open attachments or click links from an unknown or suspicious origin. If you are unsure please contact JANA IT support @ support@janacorp.com.

Fellow DITA geeks, please help out if you follow the commenterâs logic â

 

Do we need to ask him for a concrete example?

 

Kris

 

From: Denis Troaca <denistroaca@gmail.com>
Sent: Tuesday, August 8, 2023 9:22 AM
To: dita-comment@lists.oasis-open.org
Subject: [dita-comment] Key definition with key reference

 

According to DITA Specification(https://docs.oasis-open.org/dita/dita/v1.3/os/part1-base/archSpec/base/example-keydef-with-keyref.html), if we have a keydef element with a keyref to another key, the first key should pull resources from the second if they are not already present in the initial keydef. Does this rule also apply to child elements of elements within that keydef?

 

Example: 

The initial keydef contains a "topicmeta" element with no "keywords" elements or contains a "topicmeta" with a "keywords" but no "keyword" elements inside and the referenced keydef has a "topicmeta" with "keywords" and "keyword" elements. Does the initial keydef pull the "keyword" from the referenced keydef or does it keep its empty "topicmeta" element?



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]