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] Question on keyref and duplicate element IDs incomposite documents

The spec is clear that a reference to a document without specifying a topic
ID is a reference to the first topic in that document, meaning either the
root element of the document, if it is a <topic> document, for the first
descendant topic if it is a <dita> document. So in this case the keyref
points unambiguously to paragraph "para-01".

From the Linking and Addressing section:

Addressing DITA topics via URI

Topics can always be addressed by a URI reference whose fragment identifier
consists of the
topic's ID. *For the purposes of linking, a reference to a
topic-containing document
addresses the first topic within that document in
document order.* For the purposes of
rendering, a reference to a
topic-containing document addresses the root element of the

document. [Emphasis mine]

A key-defining topicref addresses a topic by URI, thus this clause applies.



On 2/22/11 10:20 PM, "Su-Laine Yeo" <su-laine.yeo@justsystems.com> wrote:

> Hi everyone,
> Another keyref question, hooray.
> Say you have a composite document called "file.dita":
> <dita>
> <topic id="topic1">
>  <title>Topic 1</title>
>  <body>
>   <p id="para-01">paragraph 1</p>
>  </body>
> </topic>
> <topic id="topic2">
>  <title>Topic 2</title>
>  <body>
>   <p id="para-01">paragraph 2</p>
>  </body>
> </topic>
> </dita>
> and this key definition:
> <map>
>   <topicref keys="myexample"
>     href="file.dita"
>   />
> </map>
> and a conkeyref using the key:
> <p id="localpara" conkeyref = "myexample/para-01"></p>
> How should the conkeyref be resolved? I.e. should it be rendered as "paragraph
> 1" or as "paragraph 2"? AFAIK there is no requirement in DITA for non-topic
> element IDs to be unique within a file.
> Cheers,
> Su-Laine
> Su-Laine Yeo
> Solutions Consultant
> JustSystems Canada, Inc.
> Office: 1 (778) 327-6356
> syeo@justsystems.com

Eliot Kimber
Senior Solutions Architect
"Bringing Strategy, Content, and Technology Together"
Main: 512.554.9368

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