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] Review #2 comment: Rules for key definition precedence

The word "associated" is a challenge here, because a given key scope is
associated (related to) multiple key spaces, namely any ancestor key
spaces it is within and any descendant key spaces within it, but it
defines exactly one key space reflecting exactly that scope.

Thus, the phrase "the key scope associated the parent key scope" is
ambiguous (because there may be multiple key spaces associated with a
given scope).

The phrase "the key space defined by the parent key scope" would be more
accurate, but that seems a longer way of saying "the parent scope's key

That is, for each key scope defined in a map there is exactly one key
space defined by that scope. Therefore it's meaningful and correct to say
"the key scope's key space", meaning the "the key space defined by the key


Eliot Kimber, Owner
Contrext, LLC

On 12/7/14, 7:57 AM, "Kristen James Eberlein"
<kris@eberleinconsulting.com> wrote:

>    DITAweb URL:
>    Text in question:
>    "When
>      a key has a definition in a parent scope's key space, that
>      definition is effective. Otherwise, a key definition is effective
>      if it is first in a breadth-first traversal of the locally-scoped
>      submaps beneath the scope-defining element. Put another way, a key
>      definition is effective if it is the first definition in the
>      shallowest map for that key. This allows higher-level map authors
>      to override keys defined in referenced submaps."
>      Comments
>    [Eliot Kimber]
>    This paragraph leaves out the general first-element
>      in scope rule. I think it needs to be more like:
>    The rules for determining effective keys are:
>* Within the same XML document, for each scope,
>        the first key definition in normal depth-first document order is
>        the effective definition for that key name within the scope and
>        any descendant scopes.
>* Within the tree of maps referenced from within
>        a scope, the first definition, in normal depth-first document
>        order, in the first map within a breadth-first traversal of the
>        map tree. 
>      [Eliot Kimber]
>    It took me a minute to figure out what the first
>      sentence was really saying. It took me a few false starts to
>      realize that the existence of key scopes changes the simple key
>      definition predecence rule.
>    In addition, this paragraph does not reflect
>      everything in the 1.2 spec's section on this, which I think is all
>      essential: 
>     "For a given key there is at
>        most one effective definition within a key space. A key
>        definition is the effective definition for a given key if it is
>        the first, in document order, within the map document that
>        contains it, and is the first in the map tree in breadth-first
>        order. It is not an error for the same key name to be defined
>        more than once within a map or map tree, and duplicate key
>        definitions   should  be ignored without warning."
>     There are important things
>        in this paragraph that have not been preserved, in particular
>        that it is not an error to define the same key name more than
>        once.
>    [Kris Eberlein]
>    I think the use of the term "parent scope's key space" is
>        impeding comprehension here. Could it be rephrased as the "key
>        space associated with the parent scope"?
>    -- 
>      Best,
>      Kris
>      Kristen James Eberlein
>      Chair, OASIS DITA Technical Committee
>      Principal consultant, Eberlein Consulting
>      www.eberleinconsulting.com <http://www.eberleinconsulting.com>
>      +1 919 682-2290; kriseberlein (skype)
>To unsubscribe from this mail list, you must leave the OASIS TC that
>generates this mail.  Follow this link to all your TCs in OASIS at:

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