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

 


Help: OASIS Mailing Lists Help | MarkMail Help

dita-comment message

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


Subject: Why are key reference ID targets restricted to non-topics elements?


For references to non-topic elements within topics, the value of the @keyref attribute is a key name, a slash ("/"), and the ID of the target element (for example, keyref="topic-key/some-element-id".)

 

http://docs.oasis-open.org/dita/dita/v1.3/errata02/os/complete/part3-all-inclusive/archSpec/base/using-keys-for-addressing.html

 

Why are keyref ID targets limited to non-topic elements?  I can’t find an explanation for this in the specification, and I can’t think of a reason why this restriction would be in place.

 

In fact, this restriction seems to operate in direct contradiction to how the id attribute operates:

 

http://docs.oasis-open.org/dita/dita/v1.3/errata02/os/complete/part3-all-inclusive/archSpec/base/id.html

 

The specification states that id attributes on topic elements are XML attribute type ID’s, so they are strictly required to be unique by the XML parser.  All other id’s only have to be unique within the topic they are declared in. 

 

It’s entirely possible to create a key reference to an element id that was declared multiple times in different sub-topics. I haven’t found anything in the specification that states how key references to an ID target that was redeclared multiple times is supposed to be resolved.  Does it take the first one?  Does it throw an error?  Is it up to the individual processor?

 

At the very least, topic id’s are required to be unique by the XML parser, so you can be confident that when you create a key reference with an ID target to a topic, you know that target is unique.

 

Can someone explain why this restriction is in place?  Is the reasoning still relevant?

 



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