OASIS Darwin Information Typing Architecture (DITA) TC

Expand all | Collapse all

Inheritance of attributes through mapref

Eliot Kimber

Eliot Kimber04-14-2009 13:59

Michael Priestley

Michael Priestley04-14-2009 15:03

Eliot Kimber

Eliot Kimber04-14-2009 15:28

Michael Priestley

Michael Priestley04-14-2009 15:51

  • 1.  Inheritance of attributes through mapref

    Posted 03-23-2009 13:08
    This is a summary of the item discussed last week and the week before,
    initially raised here:
    http://wiki.oasis-open.org/dita/MaprefResolution
    
    The consensus at the TC as I understand it is that attributes specified on
    a map reference are equivalent to the same attributes specified on the
    target element. Exceptions are format (which must be 'ditamap') and href
    (which references the target).
    
    For example, if I have this map reference:
    


  • 2.  RE: [dita] Inheritance of attributes through mapref

    Posted 03-23-2009 14:35
    This is consistent. It enables the generalization, values cascade from
    more inclusive to more particular elements (not just from parents to
    childen). Blocking the inheritance of values in some places but not in
    others can be a FUD generator (Fear, Uncertainty, and Doubt).
    
    The general effect of cascading these values is to sharpen the
    separation of content from its presentation. Not all attribute values
    have to do with presentation, of course. That's a much bigger topic, and
    not in question here.
    
    	/Bruce
    
    > 


  • 3.  RE: [dita] Inheritance of attributes through mapref

    Posted 03-24-2009 04:13
    
    
    
    
    
    
    
    
    
    
    
    

    I've edited some questions and comments into the text below.

     

       -Jeff

     

    >



  • 4.  RE: [dita] Inheritance of attributes through mapref

    Posted 03-24-2009 12:38
    Hi Jeff,
    
    > So some properties such as @format cascade within a map, but not
    > from map to map. Other properties such as @linking cascade within a
    > map and from map to map. And still other attributes such as @href
    > don’t cascade within a map or from map to map. Am I following this
    > correctly? If this is correct, it seems OK to me, we just need to
    > explain clearly which category each attribute or property is in.
    
    Yes, this is correct.
    
    > Is there yet another case where a property can cascade from a map to
    > a topic or from a map to a map to a topic and in both cases on to
    > elements within the topic? Are the rules for map to map cascades and
    > the rules for map to topic cascades the same?
    
    I believe they are not the same, mostly because some many attributes
    clearly apply to the map and not to the topic, so they would not cascade to
    the topic. We have an Arch Spec topic that covers which attributes cascade
    within a map, and one that covers which topicmeta elements cascade within
    maps and from maps to topics. It would probably make sense to have another
    topic about which attributes cascade. If so - I'd rather start a new thread
    for that.
    
    > Is @scope in the same category as @format?  I’ve always thought of
    > @format and @scope as qualifying the @href value on the current
    > element.
    
    I have some users who strongly believe otherwise. I was on the fence
    originally; the user came back with this argument:
    --------------------
          Consider this:
    
          
    
          and this
          


  • 5.  RE: [dita] Inheritance of attributes through mapref

    Posted 03-24-2009 14:32
    
    
    
    
    
    
    
    
    
    
    
    

    More comments below. I think we are close.

     

       -Jeff

     

    >



  • 6.  RE: [dita] Inheritance of attributes through mapref

    Posted 04-14-2009 13:43
    I'm afraid my action on this front has not been completed.
    
    I think we are essentially at the same spot we were at previously. The
    general conclusion is that an attribute on a map reference is equivalent to
    setting that attribute (or overriding that attribute) on the target map.
    From that point, the attributes inherit as they normally would within a
    map. This is true for elements such as toc and linking, which only take a
    single value.
    
    The two open questions are:
    1) What about attributes like @audience, which take multiple values? If my
    map reference has audience="a b", and the map has audience="c", does "a b"
    override "c", or does this result in "a b c"? If the latter, we will need
    to come up with an authoritative list of which attributes act this way (as
    opposed to the override behavior of @toc and @linking).
    
    2) What about the scope attribute? This is intended to describe the scope
    of the target of the topicref. In the case of a normal topic reference,
    scope="peer" means the target is not part of the current set of
    information, and may not be available, but is part of my overall
    information set (I think of this as a reference from one Eclipse plug-in to
    another). However, if I set @scope="peer" on a reference to a map - does
    that scope attribute describe the map (may not be available, part of
    another information set), or does the scope attribute cascade to the map,
    essentially resulting in a local map with full of peer topics?
    
    In the off-list discussion, Jeff Ogden has been pushing for the first
    behavior (@scope=peer means the map is outside of the current information
    set). I now have an action to go back to my users in IBM who are depending
    upon the second behavior, so we can see what impact this will have and/or
    see if they have other good reasons to keep this behavior.
    
    Thanks -
    
    Robert D Anderson
    IBM Authoring Tools Development
    Chief Architect, DITA Open Toolkit
    
    "Ogden, Jeff" 


  • 7.  Re: [dita] Inheritance of attributes through mapref

    Posted 04-14-2009 13:59
    On 4/14/09 8:43 AM, "Robert D Anderson" 


  • 8.  RE: [dita] Inheritance of attributes through mapref

    Posted 04-14-2009 14:50
    
    
    
    
    
    
    
    
    
    
    
    

    We don't need to provide a meaning for all possible combinations of all attribute values.  And I will argue that it is better/simpler/more understandable if we don't.

     

    So, for something like @scope we could say that when @format="ditamap" that the only meaningful value for @scope is "local", that in this case other @scope values are either

    1.    errors for which an implementation SHOULD report an error or warning message and MAY, but is NOT REQUIRED to, recover by assuming a value of "local" and continuing; or

    2.    that results are implantation specific and as a result values of @scope other than "local" SHOULD be used with caution since they may not produce the same results when used with different implementations.

     

       -Jeff

     

    >



  • 9.  RE: [dita] Inheritance of attributes through mapref

    Posted 04-14-2009 15:03
      |   view attached



  • 10.  Re: [dita] Inheritance of attributes through mapref

    Posted 04-14-2009 15:28
    On 4/14/09 10:03 AM, "Michael Priestley" 


  • 11.  Re: [dita] Inheritance of attributes through mapref

    Posted 04-14-2009 15:51
      |   view attached



  • 12.  Re: [dita] Inheritance of attributes through mapref

    Posted 04-14-2009 15:54
    On 4/14/09 10:51 AM, "Michael Priestley" 


  • 13.  RE: [dita] Inheritance of attributes through mapref

    Posted 04-14-2009 15:58
    
    
    
    
    
    
    
    
    
    
    
    

    So back to the original question, should @scope cascade from map to map or not?  Not sure I’m reading Michael’s comments correctly, but I think they are an argument that @scope should NOT cascade from map to map.

     

       -Jeff

     


    From: Michael Priestley [mailto:mpriestl@ca.ibm.com]
    Sent: Tuesday, April 14, 2009 11:52 AM
    To: Eliot Kimber
    Cc: dita; Ogden, Jeff; Robert D Anderson
    Subject: Re: [dita] Inheritance of attributes through mapref

     

    Fair enough. Navref is delayed transclusion, which may or may not be local (one reason to delay transclusion is because the resources aren't local).

    It remains logical for someone to want a cross-plugin navigation reference/transclusion that cannot be resolved at build time but will be resolved at runtime (ie format=ditamap scope=peer).

    The rationale for scope=peer applies as well to map resources as it does to topic resources.

    Michael Priestley, Senior Technical Staff Member (STSM)
    Lead IBM DITA Architect
    mpriestl@ca.ibm.com
    http://dita.xml.org/blog/25
    Eliot Kimber <ekimber@reallysi.com>

    Eliot Kimber <ekimber@reallysi.com>

    04/14/2009 11:27 AM

    To


    Michael Priestley/Toronto/IBM@IBMCA, "Ogden, Jeff" <jogden@ptc.com>

    cc


    dita <dita@lists.oasis-open.org>, Robert D Anderson <robander@us.ibm.com>

    Subject


    Re: [dita] Inheritance of attributes through mapref

     


    On 4/14/09 10:03 AM, "Michael Priestley" <mpriestl@ca.ibm.com> wrote:

    >
    > I'd go for 2) since in fact format=ditamap and scope=peer is basically a
    > navref element. It definitely shouldn't be an error.

    Hmm. I didn't quite get this from the writeup of navref. It sounded to me
    more like delayed resolution rather than a peer relationship, in that the
    presentation effect is still that the target map is used in place of the
    reference, but the transclusion is done in the renderer, not by the DITA
    processor.

    I would still take "peer" to imply a navigation relationship, not a
    transclusion relationship, the thought being that transclusion essentially
    requires local resources (because an unresolveable transclusion can result
    in meaningless results) while a broken navigation relationship does not
    result in meaningless results (even though the total intended information
    set is incomplete).

    Cheers,

    E.

    ----
    Eliot Kimber | Senior Solutions Architect | Really Strategies, Inc.
    email:  ekimber@reallysi.com <mailto:ekimber@reallysi.com>
    office: 610.631.6770 | cell: 512.554.9368
    2570 Boulevard of the Generals | Suite 213 | Audubon, PA 19403
    www.reallysi.com <http://www.reallysi.com>  | http://blog.reallysi.com
    <http://blog.reallysi.com> | www.rsuitecms.com <http://www.rsuitecms.com>


    ---------------------------------------------------------------------
    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:
    https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php 



  • 14.  RE: [dita] Inheritance of attributes through mapref

    Posted 04-14-2009 16:02
      |   view attached



  • 15.  RE: [dita] Inheritance of attributes through mapref

    Posted 04-14-2009 14:33
    
    
    
    
    
    
    
    
    
    
    
    

    This is a good summary of where we are.

     

    Some comments below.

     

       -Jeff

     

    >



  • 16.  RE: [dita] Inheritance of attributes through mapref

    Posted 04-14-2009 18:47
    
    
    
    
    
    
    
    
    
    
    

    Regarding merging vs. overriding for conditional attributes, let’s consider the following example: You are creating a document for three audiences, A, B, and C. The map includes:

    1) a topic that is common to all audiences

    2) a topic in which the entire topic is for audience A only

    3) a topic which does not apply to A at all, and contains some elements that apply only to B and some elements that apply only to C

    If generating output for audience A, you will want to include topic 1 and 2. Topic 3 should not appear at all, not even in the TOC.

    If generating output for audience B, you will want the TOC to include topic 1 and topic 3. Topic 3 should include any unconditional elements, include the elements that apply to B, and exclude the elements that apply only to C.

    Currently the OT gives the desired behaviour if you set audience=”a” on the topicref to topic 2 and audience=”b c” on the topicref to topic 3. If we were to say that audience attribute values on a topicref are added to the conditional attributes within the target topic, you would not get the desired behaviour in this case, because when generating output for audience B, you would get all the content for audience C in topic 3. I have thought of trying to get the desired behaviour by explicitly conditionalizing all of the elements in topic 3 instead of putting conditions on the topicref, however this is not feasible because you cannot conditionalize element types such as <title>.

    So I think this particular example supports a rule that conditional attribute values should be processed as the intersection as of the values on the topicref and the values on the further down the hierarchy. I think this is the rule which is actually implemented in the current OT.  

    Regards,

    Su-Laine

    Su-Laine Yeo
    Interaction Design Specialist

    JustSystems Canada, Inc.
    Office: 778-327-6356
    syeo@justsystems.com

    www.justsystems.com

    > The two open questions are:

    > 1) What about attributes like @audience, which take multiple values? If my

    > map reference has audience="a b", and the map has audience="c", does "a b"

    > override "c", or does this result in "a b c"? If the latter, we will need

    > to come up with an authoritative list of which attributes act this way (as

    > opposed to the override behavior of @toc and @linking).

     

    Don’t we already have a list for the later case (merge)?  If an attribute value cascades and the attribute allows multiple values then. it merges.  If an attribute value cascades and the attribute does not allow multiple values. it overrides.

     

    My goal here is just to make the rules for map to map cascading as much like the rules for other cascading as possible because that is more consistent and therefore easier to remember.  And while the DITA 1.1 spec. didn’t talk about map to map cascading explicitly, when it did talk about cascading more generally it talked about merging multi-valued attributes and overriding single values attributes. So it just seem unnec3essairly complicated to introduce a new case.  Note too that this question is about general cascading and that there are separate rules for conref behavior.



  • 17.  RE: [dita] Inheritance of attributes through mapref

    Posted 04-14-2009 20:57
    
    
    
    
    
    
    
    
    
    
    

    Among other things Su-Laine Yeo wrote:

    I have thought of trying to get the desired behavior by explicitly conditionalizing all of the elements in topic 3 instead of putting conditions on the topicref, however this is not feasible because you cannot conditionalize element types such as <title>.

     

    Couldn’t you conditionalize the contents of a <title> rather than the <title> itself?  Something like this:

       <title>

       <ph audience=”a”>A people are much smarter than B people</ph>

       <ph audience=”b”>B people are much smarter than A people</ph>

    </title>

     

    This isn’t an argument for or against merging or overriding values that cascade from maps to maps or from maps to topics, just an observation.

     

        -Jeff

     


    From: Su-Laine Yeo [mailto:su-laine.yeo@justsystems.com]
    Sent: Tuesday, April 14, 2009 2:45 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

     

    Regarding merging vs. overriding for conditional attributes, let’s consider the following example: You are creating a document for three audiences, A, B, and C. The map includes:

     

    1) a topic that is common to all audiences

    2) a topic in which the entire topic is for audience A only

    3) a topic which does not apply to A at all, and contains some elements that apply only to B and some elements that apply only to C

     

    If generating output for audience A, you will want to include topic 1 and 2. Topic 3 should not appear at all, not even in the TOC.

    If generating output for audience B, you will want the TOC to include topic 1 and topic 3. Topic 3 should include any unconditional elements, include the elements that apply to B, and exclude the elements that apply only to C.

     

    Currently the OT gives the desired behaviour if you set audience=”a” on the topicref to topic 2 and audience=”b c” on the topicref to topic 3. If we were to say that audience attribute values on a topicref are added to the conditional attributes within the target topic, you would not get the desired behaviour in this case, because when generating output for audience B, you would get all the content for audience C in topic 3. I have thought of trying to get the desired behaviour by explicitly conditionalizing all of the elements in topic 3 instead of putting conditions on the topicref, however this is not feasible because you cannot conditionalize element types such as <title>.

     

    So I think this particular example supports a rule that conditional attribute values should be processed as the intersection as of the values on the topicref and the values on the further down the hierarchy. I think this is the rule which is actually implemented in the current OT.  

     

    Regards,

    Su-Laine

     

     

    Su-Laine Yeo
    Interaction Design Specialist

    JustSystems Canada, Inc.
    Office: 778-327-6356
    syeo@justsystems.com

    www.justsystems.com

     

     

    > The two open questions are:

    > 1) What about attributes like @audience, which take multiple values? If my

    > map reference has audience="a b", and the map has audience="c", does "a b"

    > override "c", or does this result in "a b c"? If the latter, we will need

    > to come up with an authoritative list of which attributes act this way (as

    > opposed to the override behavior of @toc and @linking).

     

    Don’t we already have a list for the later case (merge)?  If an attribute value cascades and the attribute allows multiple values then. it merges.  If an attribute value cascades and the attribute does not allow multiple values. it overrides.

     

    My goal here is just to make the rules for map to map cascading as much like the rules for other cascading as possible because that is more consistent and therefore easier to remember.  And while the DITA 1.1 spec. didn’t talk about map to map cascading explicitly, when it did talk about cascading more generally it talked about merging multi-valued attributes and overriding single values attributes. So it just seem unnec3essairly complicated to introduce a new case.  Note too that this question is about general cascading and that there are separate rules for conref behavior.



  • 18.  RE: [dita] Inheritance of attributes through mapref

    Posted 04-14-2009 21:10
    
    
    
    
    
    
    
    
    
    
    
    

    Hi Jeff,

    Conditionalizing the contents of <title> is one option, however if you try to do this for a topic in which nothing applies to audience A, a reasonable processor asked to generate output for audience A would create a topic file with an empty <title> element, an empty <shortdesc> element, and an empty <body> element. A reasonable processor would also include a title-free link in the TOC pointing to that blank topic file. That is what the processor would have to do unless it was specifically coded to identify blank topics and suppress them, and I don’t think we want to ask processors to do that.

    Cheers,

    Su-Laine

    From: Ogden, Jeff [mailto:jogden@ptc.com]
    Sent: Tuesday, April 14, 2009 1:57 PM
    To: Su-Laine Yeo; dita
    Subject: RE: [dita] Inheritance of attributes through mapref

    Among other things Su-Laine Yeo wrote:

    I have thought of trying to get the desired behavior by explicitly conditionalizing all of the elements in topic 3 instead of putting conditions on the topicref, however this is not feasible because you cannot conditionalize element types such as <title>.

     

    Couldn’t you conditionalize the contents of a <title> rather than the <title> itself?  Something like this:

       <title>

       <ph audience=”a”>A people are much smarter than B people</ph>

       <ph audience=”b”>B people are much smarter than A people</ph>

    </title>

     

    This isn’t an argument for or against merging or overriding values that cascade from maps to maps or from maps to topics, just an observation.

     

        -Jeff

     


    From: Su-Laine Yeo [mailto:su-laine.yeo@justsystems.com]
    Sent: Tuesday, April 14, 2009 2:45 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

     

    Regarding merging vs. overriding for conditional attributes, let’s consider the following example: You are creating a document for three audiences, A, B, and C. The map includes:

     

    1) a topic that is common to all audiences

    2) a topic in which the entire topic is for audience A only

    3) a topic which does not apply to A at all, and contains some elements that apply only to B and some elements that apply only to C

     

    If generating output for audience A, you will want to include topic 1 and 2. Topic 3 should not appear at all, not even in the TOC.

    If generating output for audience B, you will want the TOC to include topic 1 and topic 3. Topic 3 should include any unconditional elements, include the elements that apply to B, and exclude the elements that apply only to C.

     

    Currently the OT gives the desired behaviour if you set audience=”a” on the topicref to topic 2 and audience=”b c” on the topicref to topic 3. If we were to say that audience attribute values on a topicref are added to the conditional attributes within the target topic, you would not get the desired behaviour in this case, because when generating output for audience B, you would get all the content for audience C in topic 3. I have thought of trying to get the desired behaviour by explicitly conditionalizing all of the elements in topic 3 instead of putting conditions on the topicref, however this is not feasible because you cannot conditionalize element types such as <title>.

     

    So I think this particular example supports a rule that conditional attribute values should be processed as the intersection as of the values on the topicref and the values on the further down the hierarchy. I think this is the rule which is actually implemented in the current OT.  

     

    Regards,

    Su-Laine

     

     

    Su-Laine Yeo
    Interaction Design Specialist

    JustSystems Canada, Inc.
    Office: 778-327-6356
    syeo@justsystems.com

    www.justsystems.com

     

     

    > The two open questions are:

    > 1) What about attributes like @audience, which take multiple values? If my

    > map reference has audience="a b", and the map has audience="c", does "a b"

    > override "c", or does this result in "a b c"? If the latter, we will need

    > to come up with an authoritative list of which attributes act this way (as

    > opposed to the override behavior of @toc and @linking).

     

    Don’t we already have a list for the later case (merge)?  If an attribute value cascades and the attribute allows multiple values then. it merges.  If an attribute value cascades and the attribute does not allow multiple values. it overrides.

     

    My goal here is just to make the rules for map to map cascading as much like the rules for other cascading as possible because that is more consistent and therefore easier to remember.  And while the DITA 1.1 spec. didn’t talk about map to map cascading explicitly, when it did talk about cascading more generally it talked about merging multi-valued attributes and overriding single values attributes. So it just seem unnec3essairly complicated to introduce a new case.  Note too that this question is about general cascading and that there are separate rules for conref behavior.



  • 19.  RE: [dita] Inheritance of attributes through mapref

    Posted 04-15-2009 20:56
    
    
    
    
    
    
    
    
    
    
    

    Su-Laine, thanks for providing a concrete use case.

     

    Is the use case just a single map and cascading of attribute properties from that map to the topics? It isn’t talking about map to map cascading is it?

     

    I thought that the map to topic case was already settled in the DITA 1.1 specification and we were just talking about cascading in the map to map case.  Am I mistaken about that?

     

    Here is what the section “Topic properties in topics and maps” in the DITA 1.1 Architecture Spec. says:

     

    The properties of a topic (including metadata attributes and metadata elements) can be specified in the

    topic itself or in references to the topic within maps.

    . . .

    If a property is set in both the map and topic, the map properties are additive if the property (such as the

    audience type) takes a list of values. If, instead, the property (such as the importance) takes a single

    value, the map property overrides the topic property.

     

    And I’m arguing that for simplicity’s sake we should follow the same rules for the map to map case as already exist for the map to topic case.

     

       -Jeff

     


    From: Su-Laine Yeo [mailto:su-laine.yeo@justsystems.com]
    Sent: Tuesday, April 14, 2009 2:45 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

     

    Regarding merging vs. overriding for conditional attributes, let’s consider the following example: You are creating a document for three audiences, A, B, and C. The map includes:

     

    1) a topic that is common to all audiences

    2) a topic in which the entire topic is for audience A only

    3) a topic which does not apply to A at all, and contains some elements that apply only to B and some elements that apply only to C

     

    If generating output for audience A, you will want to include topic 1 and 2. Topic 3 should not appear at all, not even in the TOC.

    If generating output for audience B, you will want the TOC to include topic 1 and topic 3. Topic 3 should include any unconditional elements, include the elements that apply to B, and exclude the elements that apply only to C.

     

    Currently the OT gives the desired behaviour if you set audience=”a” on the topicref to topic 2 and audience=”b c” on the topicref to topic 3. If we were to say that audience attribute values on a topicref are added to the conditional attributes within the target topic, you would not get the desired behaviour in this case, because when generating output for audience B, you would get all the content for audience C in topic 3. I have thought of trying to get the desired behaviour by explicitly conditionalizing all of the elements in topic 3 instead of putting conditions on the topicref, however this is not feasible because you cannot conditionalize element types such as <title>.

     

    So I think this particular example supports a rule that conditional attribute values should be processed as the intersection as of the values on the topicref and the values on the further down the hierarchy. I think this is the rule which is actually implemented in the current OT.  

     

    Regards,

    Su-Laine

     

     

    Su-Laine Yeo
    Interaction Design Specialist

    JustSystems Canada, Inc.
    Office: 778-327-6356
    syeo@justsystems.com

    www.justsystems.com

     

     

    > The two open questions are:

    > 1) What about attributes like @audience, which take multiple values? If my

    > map reference has audience="a b", and the map has audience="c", does "a b"

    > override "c", or does this result in "a b c"? If the latter, we will need

    > to come up with an authoritative list of which attributes act this way (as

    > opposed to the override behavior of @toc and @linking).

     

    Don’t we already have a list for the later case (merge)?  If an attribute value cascades and the attribute allows multiple values then. it merges.  If an attribute value cascades and the attribute does not allow multiple values. it overrides.

     

    My goal here is just to make the rules for map to map cascading as much like the rules for other cascading as possible because that is more consistent and therefore easier to remember.  And while the DITA 1.1 spec. didn’t talk about map to map cascading explicitly, when it did talk about cascading more generally it talked about merging multi-valued attributes and overriding single values attributes. So it just seem unnec3essairly complicated to introduce a new case.  Note too that this question is about general cascading and that there are separate rules for conref behavior.



  • 20.  RE: [dita] Inheritance of attributes through mapref

    Posted 04-16-2009 00:37
    
    
    
    
    
    
    
    
    
    
    
    

    Hi Jeff,

    Thanks for providing the relevant section of the 1.1 spec. I think the TC should re-examine whether the spec might be wrong. I agree that this thread didn’t start out with the intention of revisiting the 1.1 map-to-topic cascading rules, but if they’re wrong we should fix them before copying the problem over to the map-to-map cascading rules.

    Having said that, I thought more about the example I gave, and I think the conclusion I first reached is not quite right either. If there is a difference between the conditional values on a topicref and the values on an element in the referenced topic, the processor should have different rules depending on whether the element has values for that attribute or not. In the example, if topic 3 contains an element with no “audience” attribute, that element should be processed as if it inherits audience values from the topicref. However, if topic 3 contains an element with an “audience” attribute, that element should be processed as if its audience values are the intersection between the local values and any audience values on the topicref.

    When I think about this issue abstractly, it also seems logicially wrong to ask processors to add conditional attribute values that are set at different levels. The way that conditional attributes work is that when you specify what audiences an element is for, you are implicitly saying that it is not for any other audience. E.g. when you say that audience = “c”, you are saying that the audience is not B or A.

    Here is a second use case, which is an extension of the first but illuminates a few more issues: You are creating a document for three audiences, A, B, and C. The map includes:

     

    1) a topic that is common to all audiences

    2) a topic in which the entire topic is for audience A only

    3) a topic that does not apply to A at all, and contains some elements that apply only to B and some elements that apply only to C

    4) a topicref pointing to a submap that includes the following topics:

    - 4.1) a topic that applies to B and C only

    - 4.2) a topic for B only

    - 4.3) a topic that contains some elements that apply only to B and some elements that apply only to C

    If generating output for audience A, you will want to include topic 1 and 2. Topic 3 and submap 4 should not appear.

    If generating output for audience B, you will want the TOC to include topic 1, unconditional and B-only elements from topic 3, topic 4.1, topic 4.2, and unconditional and B-only elements from topic 4.3.

    There are four ways to indicate that topic 4.1 applies to B and C only:

    - mark topicref 4.1 as having audience =”b c”

    - mark topic 4.1 as having audience =”b c”

    - mark submap 4 as having audience =”b c”

    - mark topicref 4 as having audience =”b c”. This is useful because it is possible that the author of submap 4 knew that audiences B and C existed, but was unaware of the existence of audience A, and so did not indicate anywhere within the submap or its topics that 4.1 was a conditional topic. In this case, the author of the parent map should set “audience=”b c” on the topicref that points to submap 4.

    Using any of these four methods, the processor will give desired results if it follows the following rules for both map-to-topic and map-to-map cascading:

    - An element inherits conditional attribute values if it has no local values for that attribute.

    - An element is processed as if it has the intersection of local and inherited attribute values, if any local values exist for that attribute.

    That’s all my brain can handle today :)

    Best,

    Su-Laine

    Su-Laine Yeo
    Interaction Design Specialist

    JustSystems Canada, Inc.
    Office: 778-327-6356
    syeo@justsystems.com

    www.justsystems.com

    From: Ogden, Jeff [mailto:jogden@ptc.com]
    Sent: Wednesday, April 15, 2009 1:55 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

    Su-Laine, thanks for providing a concrete use case.

     

    Is the use case just a single map and cascading of attribute properties from that map to the topics? It isn’t talking about map to map cascading is it?

     

    I thought that the map to topic case was already settled in the DITA 1.1 specification and we were just talking about cascading in the map to map case.  Am I mistaken about that?

     

    Here is what the section “Topic properties in topics and maps” in the DITA 1.1 Architecture Spec. says:

     

    The properties of a topic (including metadata attributes and metadata elements) can be specified in the

    topic itself or in references to the topic within maps.

    . . .

    If a property is set in both the map and topic, the map properties are additive if the property (such as the

    audience type) takes a list of values. If, instead, the property (such as the importance) takes a single

    value, the map property overrides the topic property.

     

    And I’m arguing that for simplicity’s sake we should follow the same rules for the map to map case as already exist for the map to topic case.

     

       -Jeff

     


    From: Su-Laine Yeo [mailto:su-laine.yeo@justsystems.com]
    Sent: Tuesday, April 14, 2009 2:45 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

     

    Regarding merging vs. overriding for conditional attributes, let’s consider the following example: You are creating a document for three audiences, A, B, and C. The map includes:

     

    1) a topic that is common to all audiences

    2) a topic in which the entire topic is for audience A only

    3) a topic which does not apply to A at all, and contains some elements that apply only to B and some elements that apply only to C

     

    If generating output for audience A, you will want to include topic 1 and 2. Topic 3 should not appear at all, not even in the TOC.

    If generating output for audience B, you will want the TOC to include topic 1 and topic 3. Topic 3 should include any unconditional elements, include the elements that apply to B, and exclude the elements that apply only to C.

     

    Currently the OT gives the desired behaviour if you set audience=”a” on the topicref to topic 2 and audience=”b c” on the topicref to topic 3. If we were to say that audience attribute values on a topicref are added to the conditional attributes within the target topic, you would not get the desired behaviour in this case, because when generating output for audience B, you would get all the content for audience C in topic 3. I have thought of trying to get the desired behaviour by explicitly conditionalizing all of the elements in topic 3 instead of putting conditions on the topicref, however this is not feasible because you cannot conditionalize element types such as <title>.

     

    So I think this particular example supports a rule that conditional attribute values should be processed as the intersection as of the values on the topicref and the values on the further down the hierarchy. I think this is the rule which is actually implemented in the current OT.  

     

    Regards,

    Su-Laine

     

     

    Su-Laine Yeo
    Interaction Design Specialist

    JustSystems Canada, Inc.
    Office: 778-327-6356
    syeo@justsystems.com

    www.justsystems.com

     

     

    > The two open questions are:

    > 1) What about attributes like @audience, which take multiple values? If my

    > map reference has audience="a b", and the map has audience="c", does "a b"

    > override "c", or does this result in "a b c"? If the latter, we will need

    > to come up with an authoritative list of which attributes act this way (as

    > opposed to the override behavior of @toc and @linking).

     

    Don’t we already have a list for the later case (merge)?  If an attribute value cascades and the attribute allows multiple values then. it merges.  If an attribute value cascades and the attribute does not allow multiple values. it overrides.

     

    My goal here is just to make the rules for map to map cascading as much like the rules for other cascading as possible because that is more consistent and therefore easier to remember.  And while the DITA 1.1 spec. didn’t talk about map to map cascading explicitly, when it did talk about cascading more generally it talked about merging multi-valued attributes and overriding single values attributes. So it just seem unnec3essairly complicated to introduce a new case.  Note too that this question is about general cascading and that there are separate rules for conref behavior.



  • 21.  RE: [dita] Inheritance of attributes through mapref

    Posted 04-16-2009 02:11
    
    
    
    
    
    
    
    
    
    
    

    I went back to the DITA 1.0 specification to see what that said about map to topic cascading.  What I found is almost identical to the version in the DITA 1.1 spec.:

     

    Topic properties in topics and maps

    The properties of a topic can be specified in the topic itself or on references to the topic within maps.

    . . .

    If a property is set in both the map and topic, the map properties are additive if the property (such as the

    audience type) takes a list of values. If, instead, the property (such as the importance) takes a single

    value, the map property overrides the topic property.

     

    Here is the section from the DITA 1.1 spec. for comparison:

     

    Topic properties in topics and maps

    The properties of a topic (including metadata attributes and metadata elements) can be specified in the

    topic itself or in references to the topic within maps.

    . . .

    If a property is set in both the map and topic, the map properties are additive if the property (such as the

    audience type) takes a list of values. If, instead, the property (such as the importance) takes a single

    value, the map property overrides the topic property.

     

    Given this I think it is hard to argue that the DITA specifications are “wrong”.  I think a case could be made that the specification should be changed. But such a change should really require a full-blown proposal, review, and a vote. And I think that that would need to wait for DITA 1.3. And it might need to wait for DITA 2.0 since it is an incompatible change that would change the behavior for existing documents that conform to the DITA 1.0 and 1.1 specifications as originally written and approved. 

     

    My own not too well thought out feeling is that we should try to avoid an incompatible change here altogether by coming up with a syntax that allows authors to explicitly say which behavior they want (override, merge, provide new default values for those cases where no value has been explicitly given, …).  But that will take some care to design and so it too would need to wait for DITA 1.3 or 2.0.

     

        -Jeff

     


    From: Su-Laine Yeo [mailto:su-laine.yeo@justsystems.com]
    Sent: Wednesday, April 15, 2009 8:35 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

     

    Hi Jeff,

     

    Thanks for providing the relevant section of the 1.1 spec. I think the TC should re-examine whether the spec might be wrong. I agree that this thread didn’t start out with the intention of revisiting the 1.1 map-to-topic cascading rules, but if they’re wrong we should fix them before copying the problem over to the map-to-map cascading rules.

     

    Having said that, I thought more about the example I gave, and I think the conclusion I first reached is not quite right either. If there is a difference between the conditional values on a topicref and the values on an element in the referenced topic, the processor should have different rules depending on whether the element has values for that attribute or not. In the example, if topic 3 contains an element with no “audience” attribute, that element should be processed as if it inherits audience values from the topicref. However, if topic 3 contains an element with an “audience” attribute, that element should be processed as if its audience values are the intersection between the local values and any audience values on the topicref.

     

    When I think about this issue abstractly, it also seems logicially wrong to ask processors to add conditional attribute values that are set at different levels. The way that conditional attributes work is that when you specify what audiences an element is for, you are implicitly saying that it is not for any other audience. E.g. when you say that audience = “c”, you are saying that the audience is not B or A.

     

    Here is a second use case, which is an extension of the first but illuminates a few more issues: You are creating a document for three audiences, A, B, and C. The map includes:

     

    1) a topic that is common to all audiences

    2) a topic in which the entire topic is for audience A only

    3) a topic that does not apply to A at all, and contains some elements that apply only to B and some elements that apply only to C

    4) a topicref pointing to a submap that includes the following topics:

    - 4.1) a topic that applies to B and C only

    - 4.2) a topic for B only

    - 4.3) a topic that contains some elements that apply only to B and some elements that apply only to C

     

    If generating output for audience A, you will want to include topic 1 and 2. Topic 3 and submap 4 should not appear.

    If generating output for audience B, you will want the TOC to include topic 1, unconditional and B-only elements from topic 3, topic 4.1, topic 4.2, and unconditional and B-only elements from topic 4.3.

     

    There are four ways to indicate that topic 4.1 applies to B and C only:

    - mark topicref 4.1 as having audience =”b c”

    - mark topic 4.1 as having audience =”b c”

    - mark submap 4 as having audience =”b c”

    - mark topicref 4 as having audience =”b c”. This is useful because it is possible that the author of submap 4 knew that audiences B and C existed, but was unaware of the existence of audience A, and so did not indicate anywhere within the submap or its topics that 4.1 was a conditional topic. In this case, the author of the parent map should set “audience=”b c” on the topicref that points to submap 4.

     

    Using any of these four methods, the processor will give desired results if it follows the following rules for both map-to-topic and map-to-map cascading:

    - An element inherits conditional attribute values if it has no local values for that attribute.

    - An element is processed as if it has the intersection of local and inherited attribute values, if any local values exist for that attribute.

     

    That’s all my brain can handle today :)

     

    Best,

    Su-Laine

     

     

    Su-Laine Yeo
    Interaction Design Specialist

    JustSystems Canada, Inc.
    Office: 778-327-6356
    syeo@justsystems.com

    www.justsystems.com

     

     

    From: Ogden, Jeff [mailto:jogden@ptc.com]
    Sent: Wednesday, April 15, 2009 1:55 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

     

    Su-Laine, thanks for providing a concrete use case.

     

    Is the use case just a single map and cascading of attribute properties from that map to the topics? It isn’t talking about map to map cascading is it?

     

    I thought that the map to topic case was already settled in the DITA 1.1 specification and we were just talking about cascading in the map to map case.  Am I mistaken about that?

     

    Here is what the section “Topic properties in topics and maps” in the DITA 1.1 Architecture Spec. says:

     

    The properties of a topic (including metadata attributes and metadata elements) can be specified in the

    topic itself or in references to the topic within maps.

    . . .

    If a property is set in both the map and topic, the map properties are additive if the property (such as the

    audience type) takes a list of values. If, instead, the property (such as the importance) takes a single

    value, the map property overrides the topic property.

     

    And I’m arguing that for simplicity’s sake we should follow the same rules for the map to map case as already exist for the map to topic case.

     

       -Jeff

     


    From: Su-Laine Yeo [mailto:su-laine.yeo@justsystems.com]
    Sent: Tuesday, April 14, 2009 2:45 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

     

    Regarding merging vs. overriding for conditional attributes, let’s consider the following example: You are creating a document for three audiences, A, B, and C. The map includes:

     

    1) a topic that is common to all audiences

    2) a topic in which the entire topic is for audience A only

    3) a topic which does not apply to A at all, and contains some elements that apply only to B and some elements that apply only to C

     

    If generating output for audience A, you will want to include topic 1 and 2. Topic 3 should not appear at all, not even in the TOC.

    If generating output for audience B, you will want the TOC to include topic 1 and topic 3. Topic 3 should include any unconditional elements, include the elements that apply to B, and exclude the elements that apply only to C.

     

    Currently the OT gives the desired behaviour if you set audience=”a” on the topicref to topic 2 and audience=”b c” on the topicref to topic 3. If we were to say that audience attribute values on a topicref are added to the conditional attributes within the target topic, you would not get the desired behaviour in this case, because when generating output for audience B, you would get all the content for audience C in topic 3. I have thought of trying to get the desired behaviour by explicitly conditionalizing all of the elements in topic 3 instead of putting conditions on the topicref, however this is not feasible because you cannot conditionalize element types such as <title>.

     

    So I think this particular example supports a rule that conditional attribute values should be processed as the intersection as of the values on the topicref and the values on the further down the hierarchy. I think this is the rule which is actually implemented in the current OT.  

     

    Regards,

    Su-Laine

     

     

    Su-Laine Yeo
    Interaction Design Specialist

    JustSystems Canada, Inc.
    Office: 778-327-6356
    syeo@justsystems.com

    www.justsystems.com

     

     

    > The two open questions are:

    > 1) What about attributes like @audience, which take multiple values? If my

    > map reference has audience="a b", and the map has audience="c", does "a b"

    > override "c", or does this result in "a b c"? If the latter, we will need

    > to come up with an authoritative list of which attributes act this way (as

    > opposed to the override behavior of @toc and @linking).

     

    Don’t we already have a list for the later case (merge)?  If an attribute value cascades and the attribute allows multiple values then. it merges.  If an attribute value cascades and the attribute does not allow multiple values. it overrides.

     

    My goal here is just to make the rules for map to map cascading as much like the rules for other cascading as possible because that is more consistent and therefore easier to remember.  And while the DITA 1.1 spec. didn’t talk about map to map cascading explicitly, when it did talk about cascading more generally it talked about merging multi-valued attributes and overriding single values attributes. So it just seem unnec3essairly complicated to introduce a new case.  Note too that this question is about general cascading and that there are separate rules for conref behavior.



  • 22.  RE: [dita] Inheritance of attributes through mapref

    Posted 04-16-2009 18:45
    
    
    
    
    
    
    
    
    
    
    
    

    That makes sense to me Jeff. I agree that changing the spec in this regard would be a big change and that we’ll probably have to not change course for 1.2.

    I’ve thought a bit more about conditional processing with respect to other mechanisms for including child document sets in parent document sets. I can see more bad news, unfortunately. The use cases I’ve described are examples of a general case in which a child document set contains a mixture of conditional and unconditional content, that within a parent document set should be treated as entirely conditional. The Architectural Spec rules for conref attributes don’t handle this case well either:

    “A given attribute value on the resolved element comes in its entirety from either the source or target: the attribute values of the target and source for a given attribute are never additive, even if the property (such as the audience type) takes a list of values.”

    This rule will give undesired results if the conref target contains a mixture of conditional and unconditional content and the unconditional content should be treated as conditional in the context of the source document. So this rule is one more thing to think about changing.

      

    Su-Laine

    From: Ogden, Jeff [mailto:jogden@ptc.com]
    Sent: Wednesday, April 15, 2009 7:11 PM
    To: Su-Laine Yeo; dita
    Subject: RE: [dita] Inheritance of attributes through mapref

    I went back to the DITA 1.0 specification to see what that said about map to topic cascading.  What I found is almost identical to the version in the DITA 1.1 spec.:

     

    Topic properties in topics and maps

    The properties of a topic can be specified in the topic itself or on references to the topic within maps.

    . . .

    If a property is set in both the map and topic, the map properties are additive if the property (such as the

    audience type) takes a list of values. If, instead, the property (such as the importance) takes a single

    value, the map property overrides the topic property.

     

    Here is the section from the DITA 1.1 spec. for comparison:

     

    Topic properties in topics and maps

    The properties of a topic (including metadata attributes and metadata elements) can be specified in the

    topic itself or in references to the topic within maps.

    . . .

    If a property is set in both the map and topic, the map properties are additive if the property (such as the

    audience type) takes a list of values. If, instead, the property (such as the importance) takes a single

    value, the map property overrides the topic property.

     

    Given this I think it is hard to argue that the DITA specifications are “wrong”.  I think a case could be made that the specification should be changed. But such a change should really require a full-blown proposal, review, and a vote. And I think that that would need to wait for DITA 1.3. And it might need to wait for DITA 2.0 since it is an incompatible change that would change the behavior for existing documents that conform to the DITA 1.0 and 1.1 specifications as originally written and approved. 

     

    My own not too well thought out feeling is that we should try to avoid an incompatible change here altogether by coming up with a syntax that allows authors to explicitly say which behavior they want (override, merge, provide new default values for those cases where no value has been explicitly given, …).  But that will take some care to design and so it too would need to wait for DITA 1.3 or 2.0.

     

        -Jeff

     


    From: Su-Laine Yeo [mailto:su-laine.yeo@justsystems.com]
    Sent: Wednesday, April 15, 2009 8:35 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

     

    Hi Jeff,

     

    Thanks for providing the relevant section of the 1.1 spec. I think the TC should re-examine whether the spec might be wrong. I agree that this thread didn’t start out with the intention of revisiting the 1.1 map-to-topic cascading rules, but if they’re wrong we should fix them before copying the problem over to the map-to-map cascading rules.

     

    Having said that, I thought more about the example I gave, and I think the conclusion I first reached is not quite right either. If there is a difference between the conditional values on a topicref and the values on an element in the referenced topic, the processor should have different rules depending on whether the element has values for that attribute or not. In the example, if topic 3 contains an element with no “audience” attribute, that element should be processed as if it inherits audience values from the topicref. However, if topic 3 contains an element with an “audience” attribute, that element should be processed as if its audience values are the intersection between the local values and any audience values on the topicref.

     

    When I think about this issue abstractly, it also seems logicially wrong to ask processors to add conditional attribute values that are set at different levels. The way that conditional attributes work is that when you specify what audiences an element is for, you are implicitly saying that it is not for any other audience. E.g. when you say that audience = “c”, you are saying that the audience is not B or A.

     

    Here is a second use case, which is an extension of the first but illuminates a few more issues: You are creating a document for three audiences, A, B, and C. The map includes:

     

    1) a topic that is common to all audiences

    2) a topic in which the entire topic is for audience A only

    3) a topic that does not apply to A at all, and contains some elements that apply only to B and some elements that apply only to C

    4) a topicref pointing to a submap that includes the following topics:

    - 4.1) a topic that applies to B and C only

    - 4.2) a topic for B only

    - 4.3) a topic that contains some elements that apply only to B and some elements that apply only to C

     

    If generating output for audience A, you will want to include topic 1 and 2. Topic 3 and submap 4 should not appear.

    If generating output for audience B, you will want the TOC to include topic 1, unconditional and B-only elements from topic 3, topic 4.1, topic 4.2, and unconditional and B-only elements from topic 4.3.

     

    There are four ways to indicate that topic 4.1 applies to B and C only:

    - mark topicref 4.1 as having audience =”b c”

    - mark topic 4.1 as having audience =”b c”

    - mark submap 4 as having audience =”b c”

    - mark topicref 4 as having audience =”b c”. This is useful because it is possible that the author of submap 4 knew that audiences B and C existed, but was unaware of the existence of audience A, and so did not indicate anywhere within the submap or its topics that 4.1 was a conditional topic. In this case, the author of the parent map should set “audience=”b c” on the topicref that points to submap 4.

     

    Using any of these four methods, the processor will give desired results if it follows the following rules for both map-to-topic and map-to-map cascading:

    - An element inherits conditional attribute values if it has no local values for that attribute.

    - An element is processed as if it has the intersection of local and inherited attribute values, if any local values exist for that attribute.

     

    That’s all my brain can handle today :)

     

    Best,

    Su-Laine

     

     

    Su-Laine Yeo
    Interaction Design Specialist

    JustSystems Canada, Inc.
    Office: 778-327-6356
    syeo@justsystems.com

    www.justsystems.com

     

     

    From: Ogden, Jeff [mailto:jogden@ptc.com]
    Sent: Wednesday, April 15, 2009 1:55 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

     

    Su-Laine, thanks for providing a concrete use case.

     

    Is the use case just a single map and cascading of attribute properties from that map to the topics? It isn’t talking about map to map cascading is it?

     

    I thought that the map to topic case was already settled in the DITA 1.1 specification and we were just talking about cascading in the map to map case.  Am I mistaken about that?

     

    Here is what the section “Topic properties in topics and maps” in the DITA 1.1 Architecture Spec. says:

     

    The properties of a topic (including metadata attributes and metadata elements) can be specified in the

    topic itself or in references to the topic within maps.

    . . .

    If a property is set in both the map and topic, the map properties are additive if the property (such as the

    audience type) takes a list of values. If, instead, the property (such as the importance) takes a single

    value, the map property overrides the topic property.

     

    And I’m arguing that for simplicity’s sake we should follow the same rules for the map to map case as already exist for the map to topic case.

     

       -Jeff

     


    From: Su-Laine Yeo [mailto:su-laine.yeo@justsystems.com]
    Sent: Tuesday, April 14, 2009 2:45 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

     

    Regarding merging vs. overriding for conditional attributes, let’s consider the following example: You are creating a document for three audiences, A, B, and C. The map includes:

     

    1) a topic that is common to all audiences

    2) a topic in which the entire topic is for audience A only

    3) a topic which does not apply to A at all, and contains some elements that apply only to B and some elements that apply only to C

     

    If generating output for audience A, you will want to include topic 1 and 2. Topic 3 should not appear at all, not even in the TOC.

    If generating output for audience B, you will want the TOC to include topic 1 and topic 3. Topic 3 should include any unconditional elements, include the elements that apply to B, and exclude the elements that apply only to C.

     

    Currently the OT gives the desired behaviour if you set audience=”a” on the topicref to topic 2 and audience=”b c” on the topicref to topic 3. If we were to say that audience attribute values on a topicref are added to the conditional attributes within the target topic, you would not get the desired behaviour in this case, because when generating output for audience B, you would get all the content for audience C in topic 3. I have thought of trying to get the desired behaviour by explicitly conditionalizing all of the elements in topic 3 instead of putting conditions on the topicref, however this is not feasible because you cannot conditionalize element types such as <title>.

     

    So I think this particular example supports a rule that conditional attribute values should be processed as the intersection as of the values on the topicref and the values on the further down the hierarchy. I think this is the rule which is actually implemented in the current OT.  

     

    Regards,

    Su-Laine

     

     

    Su-Laine Yeo
    Interaction Design Specialist

    JustSystems Canada, Inc.
    Office: 778-327-6356
    syeo@justsystems.com

    www.justsystems.com

     

     

    > The two open questions are:

    > 1) What about attributes like @audience, which take multiple values? If my

    > map reference has audience="a b", and the map has audience="c", does "a b"

    > override "c", or does this result in "a b c"? If the latter, we will need

    > to come up with an authoritative list of which attributes act this way (as

    > opposed to the override behavior of @toc and @linking).

     

    Don’t we already have a list for the later case (merge)?  If an attribute value cascades and the attribute allows multiple values then. it merges.  If an attribute value cascades and the attribute does not allow multiple values. it overrides.

     

    My goal here is just to make the rules for map to map cascading as much like the rules for other cascading as possible because that is more consistent and therefore easier to remember.  And while the DITA 1.1 spec. didn’t talk about map to map cascading explicitly, when it did talk about cascading more generally it talked about merging multi-valued attributes and overriding single values attributes. So it just seem unnec3essairly complicated to introduce a new case.  Note too that this question is about general cascading and that there are separate rules for conref behavior.



  • 23.  RE: [dita] Inheritance of attributes through mapref

    Posted 04-16-2009 20:24
    
    
    
    
    
    
    
    I'm trying to understand this:
     

    “A given attribute value on the resolved element comes in its entirety from either the source or target: the attribute values of the target and source for a given attribute are never additive, even if the property (such as the audience type) takes a list of values.”

     
    The spec seems to leave that up to the adopter. Should it at least advise to pick one and stick to it?
     
    I suppose there's a case where you want the attribute in the target to be determinative. Here's one where  I think the source  clearly should be determinative.
    Source in thistopic.dita:
    <p conref="thattopic.dita#topicid/elementidX"  audience="beginner"/>
     
    Target in thattopic.dita:
    <concept id="topicid">
    ...
    <p id="elementidX" audience="expert">Expert stuff.</p>
    ...
    </concept>
    (This also illustrates why they shouldn't be additive.)
     
    Should the advice be that it is more manageable never to put profiling attributes in the target and always have them instead on the conref-bearing source elements? For example:
    Source in thistopic.dita:
    <p conref="thattopic.dita#topicid/elementidX"  audience="beginner"/>
    <p conref="thattopic.dita#topicid/elementidY"  audience="expert"/>
     
    Target in thattopic.dita:
    <concept id="topicid">
    ...
    <p id="elementidX" audience="expert">Beginner stuff.</p>
    <p id="elementidY" audience="expert">Expert stuff.</p>
    ...
    </concept>
    User would have to be able to inspect the attribute values in the target so as to pick the right one for each conref. But you have to pick the right target for the conref in every case anyway.
     
        /Bruce
     


    From: Su-Laine Yeo [mailto:su-laine.yeo@justsystems.com]
    Sent: Thursday, April 16, 2009 2:42 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

    That makes sense to me Jeff. I agree that changing the spec in this regard would be a big change and that we’ll probably have to not change course for 1.2.

    I’ve thought a bit more about conditional processing with respect to other mechanisms for including child document sets in parent document sets. I can see more bad news, unfortunately. The use cases I’ve described are examples of a general case in which a child document set contains a mixture of conditional and unconditional content, that within a parent document set should be treated as entirely conditional. The Architectural Spec rules for conref attributes don’t handle this case well either:

    “A given attribute value on the resolved element comes in its entirety from either the source or target: the attribute values of the target and source for a given attribute are never additive, even if the property (such as the audience type) takes a list of values.”

    This rule will give undesired results if the conref target contains a mixture of conditional and unconditional content and the unconditional content should be treated as conditional in the context of the source document. So this rule is one more thing to think about changing.

      

    Su-Laine

    From: Ogden, Jeff [mailto:jogden@ptc.com]
    Sent: Wednesday, April 15, 2009 7:11 PM
    To: Su-Laine Yeo; dita
    Subject: RE: [dita] Inheritance of attributes through mapref

    I went back to the DITA 1.0 specification to see what that said about map to topic cascading.  What I found is almost identical to the version in the DITA 1.1 spec.:

     

    Topic properties in topics and maps

    The properties of a topic can be specified in the topic itself or on references to the topic within maps.

    . . .

    If a property is set in both the map and topic, the map properties are additive if the property (such as the

    audience type) takes a list of values. If, instead, the property (such as the importance) takes a single

    value, the map property overrides the topic property.

     

    Here is the section from the DITA 1.1 spec. for comparison:

     

    Topic properties in topics and maps

    The properties of a topic (including metadata attributes and metadata elements) can be specified in the

    topic itself or in references to the topic within maps.

    . . .

    If a property is set in both the map and topic, the map properties are additive if the property (such as the

    audience type) takes a list of values. If, instead, the property (such as the importance) takes a single

    value, the map property overrides the topic property.

     

    Given this I think it is hard to argue that the DITA specifications are “wrong”.  I think a case could be made that the specification should be changed. But such a change should really require a full-blown proposal, review, and a vote. And I think that that would need to wait for DITA 1.3. And it might need to wait for DITA 2.0 since it is an incompatible change that would change the behavior for existing documents that conform to the DITA 1.0 and 1.1 specifications as originally written and approved. 

     

    My own not too well thought out feeling is that we should try to avoid an incompatible change here altogether by coming up with a syntax that allows authors to explicitly say which behavior they want (override, merge, provide new default values for those cases where no value has been explicitly given, …).  But that will take some care to design and so it too would need to wait for DITA 1.3 or 2.0.

     

        -Jeff

     


    From: Su-Laine Yeo [mailto:su-laine.yeo@justsystems.com]
    Sent: Wednesday, April 15, 2009 8:35 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

     

    Hi Jeff,

     

    Thanks for providing the relevant section of the 1.1 spec. I think the TC should re-examine whether the spec might be wrong. I agree that this thread didn’t start out with the intention of revisiting the 1.1 map-to-topic cascading rules, but if they’re wrong we should fix them before copying the problem over to the map-to-map cascading rules.

     

    Having said that, I thought more about the example I gave, and I think the conclusion I first reached is not quite right either. If there is a difference between the conditional values on a topicref and the values on an element in the referenced topic, the processor should have different rules depending on whether the element has values for that attribute or not. In the example, if topic 3 contains an element with no “audience” attribute, that element should be processed as if it inherits audience values from the topicref. However, if topic 3 contains an element with an “audience” attribute, that element should be processed as if its audience values are the intersection between the local values and any audience values on the topicref.

     

    When I think about this issue abstractly, it also seems logicially wrong to ask processors to add conditional attribute values that are set at different levels. The way that conditional attributes work is that when you specify what audiences an element is for, you are implicitly saying that it is not for any other audience. E.g. when you say that audience = “c”, you are saying that the audience is not B or A.

     

    Here is a second use case, which is an extension of the first but illuminates a few more issues: You are creating a document for three audiences, A, B, and C. The map includes:

     

    1) a topic that is common to all audiences

    2) a topic in which the entire topic is for audience A only

    3) a topic that does not apply to A at all, and contains some elements that apply only to B and some elements that apply only to C

    4) a topicref pointing to a submap that includes the following topics:

    - 4.1) a topic that applies to B and C only

    - 4.2) a topic for B only

    - 4.3) a topic that contains some elements that apply only to B and some elements that apply only to C

     

    If generating output for audience A, you will want to include topic 1 and 2. Topic 3 and submap 4 should not appear.

    If generating output for audience B, you will want the TOC to include topic 1, unconditional and B-only elements from topic 3, topic 4.1, topic 4.2, and unconditional and B-only elements from topic 4.3.

     

    There are four ways to indicate that topic 4.1 applies to B and C only:

    - mark topicref 4.1 as having audience =”b c”

    - mark topic 4.1 as having audience =”b c”

    - mark submap 4 as having audience =”b c”

    - mark topicref 4 as having audience =”b c”. This is useful because it is possible that the author of submap 4 knew that audiences B and C existed, but was unaware of the existence of audience A, and so did not indicate anywhere within the submap or its topics that 4.1 was a conditional topic. In this case, the author of the parent map should set “audience=”b c” on the topicref that points to submap 4.

     

    Using any of these four methods, the processor will give desired results if it follows the following rules for both map-to-topic and map-to-map cascading:

    - An element inherits conditional attribute values if it has no local values for that attribute.

    - An element is processed as if it has the intersection of local and inherited attribute values, if any local values exist for that attribute.

     

    That’s all my brain can handle today :)

     

    Best,

    Su-Laine

     

     

    Su-Laine Yeo
    Interaction Design Specialist

    JustSystems Canada, Inc.
    Office: 778-327-6356
    syeo@justsystems.com

    www.justsystems.com

     

     

    From: Ogden, Jeff [mailto:jogden@ptc.com]
    Sent: Wednesday, April 15, 2009 1:55 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

     

    Su-Laine, thanks for providing a concrete use case.

     

    Is the use case just a single map and cascading of attribute properties from that map to the topics? It isn’t talking about map to map cascading is it?

     

    I thought that the map to topic case was already settled in the DITA 1.1 specification and we were just talking about cascading in the map to map case.  Am I mistaken about that?

     

    Here is what the section “Topic properties in topics and maps” in the DITA 1.1 Architecture Spec. says:

     

    The properties of a topic (including metadata attributes and metadata elements) can be specified in the

    topic itself or in references to the topic within maps.

    . . .

    If a property is set in both the map and topic, the map properties are additive if the property (such as the

    audience type) takes a list of values. If, instead, the property (such as the importance) takes a single

    value, the map property overrides the topic property.

     

    And I’m arguing that for simplicity’s sake we should follow the same rules for the map to map case as already exist for the map to topic case.

     

       -Jeff

     


    From: Su-Laine Yeo [mailto:su-laine.yeo@justsystems.com]
    Sent: Tuesday, April 14, 2009 2:45 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

     

    Regarding merging vs. overriding for conditional attributes, let’s consider the following example: You are creating a document for three audiences, A, B, and C. The map includes:

     

    1) a topic that is common to all audiences

    2) a topic in which the entire topic is for audience A only

    3) a topic which does not apply to A at all, and contains some elements that apply only to B and some elements that apply only to C

     

    If generating output for audience A, you will want to include topic 1 and 2. Topic 3 should not appear at all, not even in the TOC.

    If generating output for audience B, you will want the TOC to include topic 1 and topic 3. Topic 3 should include any unconditional elements, include the elements that apply to B, and exclude the elements that apply only to C.

     

    Currently the OT gives the desired behaviour if you set audience=”a” on the topicref to topic 2 and audience=”b c” on the topicref to topic 3. If we were to say that audience attribute values on a topicref are added to the conditional attributes within the target topic, you would not get the desired behaviour in this case, because when generating output for audience B, you would get all the content for audience C in topic 3. I have thought of trying to get the desired behaviour by explicitly conditionalizing all of the elements in topic 3 instead of putting conditions on the topicref, however this is not feasible because you cannot conditionalize element types such as <title>.

     

    So I think this particular example supports a rule that conditional attribute values should be processed as the intersection as of the values on the topicref and the values on the further down the hierarchy. I think this is the rule which is actually implemented in the current OT.  

     

    Regards,

    Su-Laine

     

     

    Su-Laine Yeo
    Interaction Design Specialist

    JustSystems Canada, Inc.
    Office: 778-327-6356
    syeo@justsystems.com

    www.justsystems.com

     

     

    > The two open questions are:

    > 1) What about attributes like @audience, which take multiple values? If my

    > map reference has audience="a b", and the map has audience="c", does "a b"

    > override "c", or does this result in "a b c"? If the latter, we will need

    > to come up with an authoritative list of which attributes act this way (as

    > opposed to the override behavior of @toc and @linking).

     

    Don’t we already have a list for the later case (merge)?  If an attribute value cascades and the attribute allows multiple values then. it merges.  If an attribute value cascades and the attribute does not allow multiple values. it overrides.

     

    My goal here is just to make the rules for map to map cascading as much like the rules for other cascading as possible because that is more consistent and therefore easier to remember.  And while the DITA 1.1 spec. didn’t talk about map to map cascading explicitly, when it did talk about cascading more generally it talked about merging multi-valued attributes and overriding single values attributes. So it just seem unnec3essairly complicated to introduce a new case.  Note too that this question is about general cascading and that there are separate rules for conref behavior.



  • 24.  RE: [dita] Inheritance of attributes through mapref

    Posted 04-16-2009 20:42
    
    
    
    
    
    
    
    
    
    
    

    No, there is no choice left to the adopter.  You just need to read a slightly larger section of the Architecture Spec.  This section is just making the point that no matter what the source of the values is, that it is never additive as far as conref is concerned.

     

       -Jeff

     


    From: Bruce Nevin (bnevin) [mailto:bnevin@cisco.com]
    Sent: Thursday, April 16, 2009 4:24 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

     

    I'm trying to understand this:

     

    “A given attribute value on the resolved element comes in its entirety from either the source or target: the attribute values of the target and source for a given attribute are never additive, even if the property (such as the audience type) takes a list of values.”

     

    The spec seems to leave that up to the adopter. Should it at least advise to pick one and stick to it?

     

    I suppose there's a case where you want the attribute in the target to be determinative. Here's one where  I think the source  clearly should be determinative.

    Source in thistopic.dita:

    <p conref="thattopic.dita#topicid/elementidX"  audience="beginner"/>

     

    Target in thattopic.dita:

    <concept id="topicid">

    ...

    <p id="elementidX" audience="expert">Expert stuff.</p>

    ...

    </concept>

    (This also illustrates why they shouldn't be additive.)

     

    Should the advice be that it is more manageable never to put profiling attributes in the target and always have them instead on the conref-bearing source elements? For example:

    Source in thistopic.dita:

    <p conref="thattopic.dita#topicid/elementidX"  audience="beginner"/>

    <p conref="thattopic.dita#topicid/elementidY"  audience="expert"/>

     

    Target in thattopic.dita:

    <concept id="topicid">

    ...

    <p id="elementidX" audience="expert">Beginner stuff.</p>

    <p id="elementidY" audience="expert">Expert stuff.</p>

    ...

    </concept>

    User would have to be able to inspect the attribute values in the target so as to pick the right one for each conref. But you have to pick the right target for the conref in every case anyway.

     

        /Bruce

     

     


    From: Su-Laine Yeo [mailto:su-laine.yeo@justsystems.com]
    Sent: Thursday, April 16, 2009 2:42 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

    That makes sense to me Jeff. I agree that changing the spec in this regard would be a big change and that we’ll probably have to not change course for 1.2.

     

    I’ve thought a bit more about conditional processing with respect to other mechanisms for including child document sets in parent document sets. I can see more bad news, unfortunately. The use cases I’ve described are examples of a general case in which a child document set contains a mixture of conditional and unconditional content, that within a parent document set should be treated as entirely conditional. The Architectural Spec rules for conref attributes don’t handle this case well either:

     

    “A given attribute value on the resolved element comes in its entirety from either the source or target: the attribute values of the target and source for a given attribute are never additive, even if the property (such as the audience type) takes a list of values.”

     

    This rule will give undesired results if the conref target contains a mixture of conditional and unconditional content and the unconditional content should be treated as conditional in the context of the source document. So this rule is one more thing to think about changing.

      

    Su-Laine

     

     

    From: Ogden, Jeff [mailto:jogden@ptc.com]
    Sent: Wednesday, April 15, 2009 7:11 PM
    To: Su-Laine Yeo; dita
    Subject: RE: [dita] Inheritance of attributes through mapref

     

    I went back to the DITA 1.0 specification to see what that said about map to topic cascading.  What I found is almost identical to the version in the DITA 1.1 spec.:

     

    Topic properties in topics and maps

    The properties of a topic can be specified in the topic itself or on references to the topic within maps.

    . . .

    If a property is set in both the map and topic, the map properties are additive if the property (such as the

    audience type) takes a list of values. If, instead, the property (such as the importance) takes a single

    value, the map property overrides the topic property.

     

    Here is the section from the DITA 1.1 spec. for comparison:

     

    Topic properties in topics and maps

    The properties of a topic (including metadata attributes and metadata elements) can be specified in the

    topic itself or in references to the topic within maps.

    . . .

    If a property is set in both the map and topic, the map properties are additive if the property (such as the

    audience type) takes a list of values. If, instead, the property (such as the importance) takes a single

    value, the map property overrides the topic property.

     

    Given this I think it is hard to argue that the DITA specifications are “wrong”.  I think a case could be made that the specification should be changed. But such a change should really require a full-blown proposal, review, and a vote. And I think that that would need to wait for DITA 1.3. And it might need to wait for DITA 2.0 since it is an incompatible change that would change the behavior for existing documents that conform to the DITA 1.0 and 1.1 specifications as originally written and approved. 

     

    My own not too well thought out feeling is that we should try to avoid an incompatible change here altogether by coming up with a syntax that allows authors to explicitly say which behavior they want (override, merge, provide new default values for those cases where no value has been explicitly given, …).  But that will take some care to design and so it too would need to wait for DITA 1.3 or 2.0.

     

        -Jeff

     


    From: Su-Laine Yeo [mailto:su-laine.yeo@justsystems.com]
    Sent: Wednesday, April 15, 2009 8:35 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

     

    Hi Jeff,

     

    Thanks for providing the relevant section of the 1.1 spec. I think the TC should re-examine whether the spec might be wrong. I agree that this thread didn’t start out with the intention of revisiting the 1.1 map-to-topic cascading rules, but if they’re wrong we should fix them before copying the problem over to the map-to-map cascading rules.

     

    Having said that, I thought more about the example I gave, and I think the conclusion I first reached is not quite right either. If there is a difference between the conditional values on a topicref and the values on an element in the referenced topic, the processor should have different rules depending on whether the element has values for that attribute or not. In the example, if topic 3 contains an element with no “audience” attribute, that element should be processed as if it inherits audience values from the topicref. However, if topic 3 contains an element with an “audience” attribute, that element should be processed as if its audience values are the intersection between the local values and any audience values on the topicref.

     

    When I think about this issue abstractly, it also seems logicially wrong to ask processors to add conditional attribute values that are set at different levels. The way that conditional attributes work is that when you specify what audiences an element is for, you are implicitly saying that it is not for any other audience. E.g. when you say that audience = “c”, you are saying that the audience is not B or A.

     

    Here is a second use case, which is an extension of the first but illuminates a few more issues: You are creating a document for three audiences, A, B, and C. The map includes:

     

    1) a topic that is common to all audiences

    2) a topic in which the entire topic is for audience A only

    3) a topic that does not apply to A at all, and contains some elements that apply only to B and some elements that apply only to C

    4) a topicref pointing to a submap that includes the following topics:

    - 4.1) a topic that applies to B and C only

    - 4.2) a topic for B only

    - 4.3) a topic that contains some elements that apply only to B and some elements that apply only to C

     

    If generating output for audience A, you will want to include topic 1 and 2. Topic 3 and submap 4 should not appear.

    If generating output for audience B, you will want the TOC to include topic 1, unconditional and B-only elements from topic 3, topic 4.1, topic 4.2, and unconditional and B-only elements from topic 4.3.

     

    There are four ways to indicate that topic 4.1 applies to B and C only:

    - mark topicref 4.1 as having audience =”b c”

    - mark topic 4.1 as having audience =”b c”

    - mark submap 4 as having audience =”b c”

    - mark topicref 4 as having audience =”b c”. This is useful because it is possible that the author of submap 4 knew that audiences B and C existed, but was unaware of the existence of audience A, and so did not indicate anywhere within the submap or its topics that 4.1 was a conditional topic. In this case, the author of the parent map should set “audience=”b c” on the topicref that points to submap 4.

     

    Using any of these four methods, the processor will give desired results if it follows the following rules for both map-to-topic and map-to-map cascading:

    - An element inherits conditional attribute values if it has no local values for that attribute.

    - An element is processed as if it has the intersection of local and inherited attribute values, if any local values exist for that attribute.

     

    That’s all my brain can handle today :)

     

    Best,

    Su-Laine

     

     

    Su-Laine Yeo
    Interaction Design Specialist

    JustSystems Canada, Inc.
    Office: 778-327-6356
    syeo@justsystems.com

    www.justsystems.com

     

     

    From: Ogden, Jeff [mailto:jogden@ptc.com]
    Sent: Wednesday, April 15, 2009 1:55 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

     

    Su-Laine, thanks for providing a concrete use case.

     

    Is the use case just a single map and cascading of attribute properties from that map to the topics? It isn’t talking about map to map cascading is it?

     

    I thought that the map to topic case was already settled in the DITA 1.1 specification and we were just talking about cascading in the map to map case.  Am I mistaken about that?

     

    Here is what the section “Topic properties in topics and maps” in the DITA 1.1 Architecture Spec. says:

     

    The properties of a topic (including metadata attributes and metadata elements) can be specified in the

    topic itself or in references to the topic within maps.

    . . .

    If a property is set in both the map and topic, the map properties are additive if the property (such as the

    audience type) takes a list of values. If, instead, the property (such as the importance) takes a single

    value, the map property overrides the topic property.

     

    And I’m arguing that for simplicity’s sake we should follow the same rules for the map to map case as already exist for the map to topic case.

     

       -Jeff

     


    From: Su-Laine Yeo [mailto:su-laine.yeo@justsystems.com]
    Sent: Tuesday, April 14, 2009 2:45 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

     

    Regarding merging vs. overriding for conditional attributes, let’s consider the following example: You are creating a document for three audiences, A, B, and C. The map includes:

     

    1) a topic that is common to all audiences

    2) a topic in which the entire topic is for audience A only

    3) a topic which does not apply to A at all, and contains some elements that apply only to B and some elements that apply only to C

     

    If generating output for audience A, you will want to include topic 1 and 2. Topic 3 should not appear at all, not even in the TOC.

    If generating output for audience B, you will want the TOC to include topic 1 and topic 3. Topic 3 should include any unconditional elements, include the elements that apply to B, and exclude the elements that apply only to C.

     

    Currently the OT gives the desired behaviour if you set audience=”a” on the topicref to topic 2 and audience=”b c” on the topicref to topic 3. If we were to say that audience attribute values on a topicref are added to the conditional attributes within the target topic, you would not get the desired behaviour in this case, because when generating output for audience B, you would get all the content for audience C in topic 3. I have thought of trying to get the desired behaviour by explicitly conditionalizing all of the elements in topic 3 instead of putting conditions on the topicref, however this is not feasible because you cannot conditionalize element types such as <title>.

     

    So I think this particular example supports a rule that conditional attribute values should be processed as the intersection as of the values on the topicref and the values on the further down the hierarchy. I think this is the rule which is actually implemented in the current OT.  

     

    Regards,

    Su-Laine

     

     

    Su-Laine Yeo
    Interaction Design Specialist

    JustSystems Canada, Inc.
    Office: 778-327-6356
    syeo@justsystems.com

    www.justsystems.com

     

     

    > The two open questions are:

    > 1) What about attributes like @audience, which take multiple values? If my

    > map reference has audience="a b", and the map has audience="c", does "a b"

    > override "c", or does this result in "a b c"? If the latter, we will need

    > to come up with an authoritative list of which attributes act this way (as

    > opposed to the override behavior of @toc and @linking).

     

    Don’t we already have a list for the later case (merge)?  If an attribute value cascades and the attribute allows multiple values then. it merges.  If an attribute value cascades and the attribute does not allow multiple values. it overrides.

     

    My goal here is just to make the rules for map to map cascading as much like the rules for other cascading as possible because that is more consistent and therefore easier to remember.  And while the DITA 1.1 spec. didn’t talk about map to map cascading explicitly, when it did talk about cascading more generally it talked about merging multi-valued attributes and overriding single values attributes. So it just seem unnec3essairly complicated to introduce a new case.  Note too that this question is about general cascading and that there are separate rules for conref behavior.



  • 25.  RE: [dita] Inheritance of attributes through mapref

    Posted 04-16-2009 20:43
    Hi Bruce,
    
    That sentence is just meant to highlight the fact that you cannot combine -
    they must come from one or the other. Which one they come from is
    determined by rules laid out in the previous few paragraphs -- with rare
    exceptions, an attribute on the source always wins. The only time the
    target's audience attribute would be used is if the source does not specify
    @audience.
    
    The (rather important) additional context is here:
    http://docs.oasis-open.org/dita/v1.1/OS/archspec/conref.html
    
    Robert D Anderson
    IBM Authoring Tools Development
    Chief Architect, DITA Open Toolkit
    
    
    
    I'm trying to understand this:
    
    “A given attribute value on the resolved element comes in its entirety from
    either the source or target: the attribute values of the target and source
    for a given attribute are never additive, even if the property (such as the
    audience type) takes a list of values.”
    
    
    
    The spec seems to leave that up to the adopter. Should it at least advise
    to pick one and stick to it?
    
    I suppose there's a case where you want the attribute in the target to be
    determinative. Here's one where  I think the source  clearly should be
    determinative.
          Source in thistopic.dita:
          

    Target in thattopic.dita:

    Expert stuff.

    ... (This also illustrates why they shouldn't be additive.) Should the advice be that it is more manageable never to put profiling attributes in the target and always have them instead on the conref-bearing source elements? For example: Source in thistopic.dita:

    Target in thattopic.dita:

    Beginner stuff.

    Expert stuff.

    ... User would have to be able to inspect the attribute values in the target so as to pick the right one for each conref. But you have to pick the right target for the conref in every case anyway. /Bruce From: Su-Laine Yeo [mailto:su-laine.yeo@justsystems.com] Sent: Thursday, April 16, 2009 2:42 PM To: dita Subject: RE: [dita] Inheritance of attributes through mapref That makes sense to me Jeff. I agree that changing the spec in this regard would be a big change and that we’ll probably have to not change course for 1.2. I’ve thought a bit more about conditional processing with respect to other mechanisms for including child document sets in parent document sets. I can see more bad news, unfortunately. The use cases I’ve described are examples of a general case in which a child document set contains a mixture of conditional and unconditional content, that within a parent document set should be treated as entirely conditional. The Architectural Spec rules for conref attributes don’t handle this case well either: “A given attribute value on the resolved element comes in its entirety from either the source or target: the attribute values of the target and source for a given attribute are never additive, even if the property (such as the audience type) takes a list of values.” This rule will give undesired results if the conref target contains a mixture of conditional and unconditional content and the unconditional content should be treated as conditional in the context of the source document. So this rule is one more thing to think about changing. Su-Laine From: Ogden, Jeff [mailto:jogden@ptc.com] Sent: Wednesday, April 15, 2009 7:11 PM To: Su-Laine Yeo; dita Subject: RE: [dita] Inheritance of attributes through mapref I went back to the DITA 1.0 specification to see what that said about map to topic cascading. What I found is almost identical to the version in the DITA 1.1 spec.: Topic properties in topics and maps The properties of a topic can be specified in the topic itself or on references to the topic within maps. . . . If a property is set in both the map and topic, the map properties are additive if the property (such as the audience type) takes a list of values. If, instead, the property (such as the importance) takes a single value, the map property overrides the topic property. Here is the section from the DITA 1.1 spec. for comparison: Topic properties in topics and maps The properties of a topic (including metadata attributes and metadata elements) can be specified in the topic itself or in references to the topic within maps. . . . If a property is set in both the map and topic, the map properties are additive if the property (such as the audience type) takes a list of values. If, instead, the property (such as the importance) takes a single value, the map property overrides the topic property. Given this I think it is hard to argue that the DITA specifications are “wrong”. I think a case could be made that the specification should be changed. But such a change should really require a full-blown proposal, review, and a vote. And I think that that would need to wait for DITA 1.3. And it might need to wait for DITA 2.0 since it is an incompatible change that would change the behavior for existing documents that conform to the DITA 1.0 and 1.1 specifications as originally written and approved. My own not too well thought out feeling is that we should try to avoid an incompatible change here altogether by coming up with a syntax that allows authors to explicitly say which behavior they want (override, merge, provide new default values for those cases where no value has been explicitly given, …). But that will take some care to design and so it too would need to wait for DITA 1.3 or 2.0. -Jeff From: Su-Laine Yeo [mailto:su-laine.yeo@justsystems.com] Sent: Wednesday, April 15, 2009 8:35 PM To: dita Subject: RE: [dita] Inheritance of attributes through mapref Hi Jeff, Thanks for providing the relevant section of the 1.1 spec. I think the TC should re-examine whether the spec might be wrong. I agree that this thread didn’t start out with the intention of revisiting the 1.1 map-to-topic cascading rules, but if they’re wrong we should fix them before copying the problem over to the map-to-map cascading rules. Having said that, I thought more about the example I gave, and I think the conclusion I first reached is not quite right either. If there is a difference between the conditional values on a topicref and the values on an element in the referenced topic, the processor should have different rules depending on whether the element has values for that attribute or not. In the example, if topic 3 contains an element with no “audience” attribute, that element should be processed as if it inherits audience values from the topicref. However, if topic 3 contains an element with an “audience” attribute, that element should be processed as if its audience values are the intersection between the local values and any audience values on the topicref. When I think about this issue abstractly, it also seems logicially wrong to ask processors to add conditional attribute values that are set at different levels. The way that conditional attributes work is that when you specify what audiences an element is for, you are implicitly saying that it is not for any other audience. E.g. when you say that audience = “c”, you are saying that the audience is not B or A. Here is a second use case, which is an extension of the first but illuminates a few more issues: You are creating a document for three audiences, A, B, and C. The map includes: 1) a topic that is common to all audiences 2) a topic in which the entire topic is for audience A only 3) a topic that does not apply to A at all, and contains some elements that apply only to B and some elements that apply only to C 4) a topicref pointing to a submap that includes the following topics: - 4.1) a topic that applies to B and C only - 4.2) a topic for B only - 4.3) a topic that contains some elements that apply only to B and some elements that apply only to C If generating output for audience A, you will want to include topic 1 and 2. Topic 3 and submap 4 should not appear. If generating output for audience B, you will want the TOC to include topic 1, unconditional and B-only elements from topic 3, topic 4.1, topic 4.2, and unconditional and B-only elements from topic 4.3. There are four ways to indicate that topic 4.1 applies to B and C only: - mark topicref 4.1 as having audience =”b c” - mark topic 4.1 as having audience =”b c” - mark submap 4 as having audience =”b c” - mark topicref 4 as having audience =”b c”. This is useful because it is possible that the author of submap 4 knew that audiences B and C existed, but was unaware of the existence of audience A, and so did not indicate anywhere within the submap or its topics that 4.1 was a conditional topic. In this case, the author of the parent map should set “audience=”b c” on the topicref that points to submap 4. Using any of these four methods, the processor will give desired results if it follows the following rules for both map-to-topic and map-to-map cascading: - An element inherits conditional attribute values if it has no local values for that attribute. - An element is processed as if it has the intersection of local and inherited attribute values, if any local values exist for that attribute. That’s all my brain can handle today :) Best, Su-Laine Su-Laine Yeo Interaction Design Specialist JustSystems Canada, Inc. Office: 778-327-6356 syeo@justsystems.com www.justsystems.com From: Ogden, Jeff [mailto:jogden@ptc.com] Sent: Wednesday, April 15, 2009 1:55 PM To: dita Subject: RE: [dita] Inheritance of attributes through mapref Su-Laine, thanks for providing a concrete use case. Is the use case just a single map and cascading of attribute properties from that map to the topics? It isn’t talking about map to map cascading is it? I thought that the map to topic case was already settled in the DITA 1.1 specification and we were just talking about cascading in the map to map case. Am I mistaken about that? Here is what the section “Topic properties in topics and maps” in the DITA 1.1 Architecture Spec. says: The properties of a topic (including metadata attributes and metadata elements) can be specified in the topic itself or in references to the topic within maps. . . . If a property is set in both the map and topic, the map properties are additive if the property (such as the audience type) takes a list of values. If, instead, the property (such as the importance) takes a single value, the map property overrides the topic property. And I’m arguing that for simplicity’s sake we should follow the same rules for the map to map case as already exist for the map to topic case. -Jeff From: Su-Laine Yeo [mailto:su-laine.yeo@justsystems.com] Sent: Tuesday, April 14, 2009 2:45 PM To: dita Subject: RE: [dita] Inheritance of attributes through mapref Regarding merging vs. overriding for conditional attributes, let’s consider the following example: You are creating a document for three audiences, A, B, and C. The map includes: 1) a topic that is common to all audiences 2) a topic in which the entire topic is for audience A only 3) a topic which does not apply to A at all, and contains some elements that apply only to B and some elements that apply only to C If generating output for audience A, you will want to include topic 1 and 2. Topic 3 should not appear at all, not even in the TOC. If generating output for audience B, you will want the TOC to include topic 1 and topic 3. Topic 3 should include any unconditional elements, include the elements that apply to B, and exclude the elements that apply only to C. Currently the OT gives the desired behaviour if you set audience=”a” on the topicref to topic 2 and audience=”b c” on the topicref to topic 3. If we were to say that audience attribute values on a topicref are added to the conditional attributes within the target topic, you would not get the desired behaviour in this case, because when generating output for audience B, you would get all the content for audience C in topic 3. I have thought of trying to get the desired behaviour by explicitly conditionalizing all of the elements in topic 3 instead of putting conditions on the topicref, however this is not feasible because you cannot conditionalize element types such as


  • 26.  RE: [dita] Inheritance of attributes through mapref

    Posted 04-18-2009 04:37
    
    
    
    
    
    
    
    
    
    
    

    Let me try to outline where I think things stand. I’m doing this as much to get this straight in my own mind as to make an argument for a specific solution. 

     

    There seem to be three questions left to resolve.  I’ve marked them in orange.

      

    1. Do multi-valued attributes override or merge when they cascade from map to map?  I think they should work the same as they do for map to topic cascading, that is they should merge.  See item #2 below.

     

    1. While @base and attributes specialized upon @base do not cascade within maps or topics, it is unclear if @base or a specialization based upon @base cascades from a map to a topic or not. I’m guessing that they should.  See item #3 below.

     

    1. We need to confirm the behavior for @scope when cascading from map to map.  See item #3 below.

     

    I think we have five situations where attribute values can cascade.  The first four are related and are applied in order from #1 to #4. The fifth is @conref processing and is separate.

     

    #1 Cascading within a map.

     

    This is already well defined as part of DITA 1.1 and I don’t think we are making any changes for DITA 1.2.

    From the DITA 1.1 Spec:

    Inheritance is additive except where this would cause a conflict. When there is a conflict, the value

    defined closest (most specifically) to the topicref takes effect.

    Here “additive” means what I’ve been calling “merge” and there is no overriding.

    There is a specific list of attributes that cascade within a map and the implication is that other attributes do not.

    @base and attributes specialized form @base do not cascade within a map (or a topic).

    Attribute values that cascade cascade within the within the entire map, they never merge or override, but they always supply default values for attributes that don’t have explicit values and which do not have default values assigned in the DTD or Schema.

     

    #2 Cascading from a map to a map

     

    This is not well defined as part of DITA 1.1 and we are trying to do a better job for DITA 1.2. 

     

    The idea is that values in one map cascade from that map to the top element in a referenced map or to the top element in a reference branch within a map. And then within the referenced map cascading follows the rules outlined for cascading within a map (#1).

     

    It seems clear that for single valued attributes, that the values in the referencing map override or replace the values on the top element in the referenced map or branch.

     

    What is still unsettled is what happens for multi-valued attributes.

     

    There is a description and a long table that defines “Metadata inheritance between maps and topics” in the DITA 1.1 Architecture Spec. I don’t think we are making changes to this for DITA 1.2. But that discussion is about cascading of metadata elements more than it is about cascading of attribute values.  However, some of the concepts outlined for elements may be useful to us as we work to define the map to map cascading behaviors for attributes:

    For each element in the topicmeta, the following table provides different behaviors.

    * Does it cascade to other topics in the map? This indicates whether the specified meta value cascades

    to nested topicrefs. For example, setting an audience to userimplicitly means that other topicrefs

    within that branch of the map also have an audience of user. Elements like linktext, which can apply

    only to the specified target, do not cascade.

    * What is the purpose when specified at the map level? The map element allows for metadata to be

    specified for the entire map. This column describes what effect, if any, each element has when specified

    at this level.

    In the “Does it cascade to other topics in the map” column you see “Yes”, “No”, and “No, unless …”.

    In the “What is the purpose when specified at the map level” you see many items that say “specify something for the entire map”, and a few that say “no stated purpose” or “no stated purpose until …”.

     

    @base and attributes specialized upon @base do not cascade from map to map.

     

    The attributes that cascade from map to map are the same as the attributes that cascade from within a map, with the exception of @format and @scope. 

     

    The other thing that was still unsettled was if @scope behaved like @format or if it cascaded from map to map. Robert recently checked with a client that depended on @scope cascading from map to map and determined that it would be acceptable if @scope didn’t cascade. So if the TC is comfortable with treating @format and @scope the same way in this respect this question is settled.

     

    #3 Cascading from a map to a topic

     

    The same description and a long table mentioned above defines “Metadata inheritance between maps and topics” in the DITA 1.1 Architecture Spec. I don’t think we are making changes to this for DITA 1.2. But that discussion is about cascading of metadata elements more than it is about cascading of attribute values.

     

    Cascading of attribute values from maps to topics is not so well defined in DITA 1.1 and we are trying to do a better job for DITA 1.2.

     

    One approach is to use the concepts outlined for cascading of metadata elements and apply them to the cascading of attribute values from maps to topics. Here are the high level concepts outlined for map to topic element cascading in the DITA 1.1 spec.:

    For each element in the topicmeta, the following table provides different behaviors.

    * How does it apply to the topic? This describes how the metadata in a topicref interacts with the

    specified topic. In most cases, the properties are additive, within the current context. For example, when

    an audience is set to userwithin a topicref, this means that the audience for the specified topic is

    userwhen viewed within this context. This is in addition to any audience values specified within the

    topic, and does not apply to the topic when it is viewed in other contexts.

    And most of the entries in this column of the table say “Add to the topic”, but a few say “Replace the one in the topic” and “Not added to the topic; applies to links created based on this occurrence in the map”. And I take “additive”, “in addition to”, and “add to” to mean what I have been calling merge.

     

    It is probably better to think and talk about elements and attributes as defining properties where the properties cascade from maps to topics.

    From the section on “Topic properties in topics and maps” in the DITA 1.1 Architecture Spec:

    The properties of a topic (including metadata attributes and metadata elements) can be specified in the

    topic itself or in references to the topic within maps.

    . . .

    If a property is set in both the map and topic, the map properties are additive if the property (such as the

    audience type) takes a list of values. If, instead, the property (such as the importance) takes a single

    value, the map property overrides the topic property.

     

    The idea is that properties defined by elements or attributes in a map cascade from that map to the top element in a referenced topic or to all of the top topic elements in a ditabase. And then within the referenced topic(s) cascading follows the rules outlined for cascading within a topic (#4). The list of attributes that cascade from maps to topics is the same as the list that cascades from maps to maps.

     

    While @base and attributes specialized upon @base do not cascade within maps or topics, it is unclear if @base or a specialization based upon @base cascades from a map to a topic or not. I’m guessing that they should.

     

    #4 Cascading within a topic.

     

    I had thought that this was already well defined as part of DITA 1.1 and I don’t think we are making any changes for DITA 1.2, but the DITA 1.1 Architecture Spec. really says very little about cascading within a topic.  However, there are some comments about this in the DITA 1.1 Language Spec.

    @scope: If no value is specified, but the attribute is specified on an ancestor within a map or within the related-links section, the value will inherit from the closest ancestor.

    @props and many other attributes: If no value is specified, but the attribute is specified on an ancestor within a map or within the related-links section, the value will inherit from the closest ancestor

    @type: Processed as if the target were of type topic, or inherited from an ancestor

    [this and a number of other descriptions don’t say the bit about “within a map or within the related-links section”, but I assume that that is implied -Jeff].

    <linkpool>: Attributes set on <linkpool> are inherited by its descendants. For example, if you’ve got a <linkpool> that contains all external links, you can set scope=externalon that outer<linkpool> element and leave it off the links it contains.

     

    I assume, but haven’t checked, that the list of attributes that cascade within the related-links section in a topic is the same as the list of attributes that cascade within a map (#1) to the extent that the same attributes occur in both places.

     

    @base, attributes specialized upon @base, @status, and @importance do not cascade within a topic or a map.

     

    So attribute values that cascade only cascade within the related-links section of topics and then they never merge or override, but they always supply default values for attributes that don’t have explicit values and which do not have default values assigned in the DTD or Schema.

     

    #5 Cascading as part of conref processing.

     

    This is already well defined in the DITA 1.1 Architecture Spec. and I don’t think we are talking about any changes for DITA 1.2. In this case attribute values override and never merge between the conref source and target elements and once conref processing is complete, attribute values cascade or not within the conref section according to the regular cascading rules (#1 and #4).

     

    There are special rules for @xml:lang, @dir, and @translate which are described in the DITA 1.1 Architecture Spec.

     

         -Jeff

     



  • 27.  RE: [dita] Inheritance of attributes through mapref

    Posted 04-21-2009 01:37
    
    
    
    
    
    
    
    
    
    
    

    Thanks Jeff for the nice summary.

    I can’t say I’ve gotten my head around all aspects of these issues. However, some housekeeping regarding #5 “Cascading as part of conref processing” is that the role of the dita-use-conref-target value should be mentioned.

    Regarding the issues I raised earlier about the cascading of conditional attribute values, I haven’t heard any discussion since Thursday. So I plan to write a proposal for DITA 1.3 to better accommodate the case of including partially-conditional child documents in a parent document set.

    Cheers,

    Su-Laine

    Su-Laine Yeo
    Interaction Design Specialist

    JustSystems Canada, Inc.
    Office: 778-327-6356
    syeo@justsystems.com

    www.justsystems.com

    From: Ogden, Jeff [mailto:jogden@ptc.com]
    Sent: Friday, April 17, 2009 9:36 PM
    To: dita
    Subject: RE: [dita] Inheritance of attributes through mapref

    Let me try to outline where I think things stand. I’m doing this as much to get this straight in my own mind as to make an argument for a specific solution. 

     

    There seem to be three questions left to resolve.  I’ve marked them in orange.

      

    1. Do multi-valued attributes override or merge when they cascade from map to map?  I think they should work the same as they do for map to topic cascading, that is they should merge.  See item #2 below.

     

    1. While @base and attributes specialized upon @base do not cascade within maps or topics, it is unclear if @base or a specialization based upon @base cascades from a map to a topic or not. I’m guessing that they should.  See item #3 below.

     

    1. We need to confirm the behavior for @scope when cascading from map to map.  See item #3 below.

     

    I think we have five situations where attribute values can cascade.  The first four are related and are applied in order from #1 to #4. The fifth is @conref processing and is separate.

     

    #1 Cascading within a map.

     

    This is already well defined as part of DITA 1.1 and I don’t think we are making any changes for DITA 1.2.

    From the DITA 1.1 Spec:

    Inheritance is additive except where this would cause a conflict. When there is a conflict, the value

    defined closest (most specifically) to the topicref takes effect.

    Here “additive” means what I’ve been calling “merge” and there is no overriding.

    There is a specific list of attributes that cascade within a map and the implication is that other attributes do not.

    @base and attributes specialized form @base do not cascade within a map (or a topic).

    Attribute values that cascade cascade within the within the entire map, they never merge or override, but they always supply default values for attributes that don’t have explicit values and which do not have default values assigned in the DTD or Schema.

     

    #2 Cascading from a map to a map

     

    This is not well defined as part of DITA 1.1 and we are trying to do a better job for DITA 1.2. 

     

    The idea is that values in one map cascade from that map to the top element in a referenced map or to the top element in a reference branch within a map. And then within the referenced map cascading follows the rules outlined for cascading within a map (#1).

     

    It seems clear that for single valued attributes, that the values in the referencing map override or replace the values on the top element in the referenced map or branch.

     

    What is still unsettled is what happens for multi-valued attributes.

     

    There is a description and a long table that defines “Metadata inheritance between maps and topics” in the DITA 1.1 Architecture Spec. I don’t think we are making changes to this for DITA 1.2. But that discussion is about cascading of metadata elements more than it is about cascading of attribute values.  However, some of the concepts outlined for elements may be useful to us as we work to define the map to map cascading behaviors for attributes:

    For each element in the topicmeta, the following table provides different behaviors.

    * Does it cascade to other topics in the map? This indicates whether the specified meta value cascades

    to nested topicrefs. For example, setting an audience to userimplicitly means that other topicrefs

    within that branch of the map also have an audience of user. Elements like linktext, which can apply

    only to the specified target, do not cascade.

    * What is the purpose when specified at the map level? The map element allows for metadata to be

    specified for the entire map. This column describes what effect, if any, each element has when specified

    at this level.

    In the “Does it cascade to other topics in the map” column you see “Yes”, “No”, and “No, unless …”.

    In the “What is the purpose when specified at the map level” you see many items that say “specify something for the entire map”, and a few that say “no stated purpose” or “no stated purpose until …”.

     

    @base and attributes specialized upon @base do not cascade from map to map.

     

    The attributes that cascade from map to map are the same as the attributes that cascade from within a map, with the exception of @format and @scope. 

     

    The other thing that was still unsettled was if @scope behaved like @format or if it cascaded from map to map. Robert recently checked with a client that depended on @scope cascading from map to map and determined that it would be acceptable if @scope didn’t cascade. So if the TC is comfortable with treating @format and @scope the same way in this respect this question is settled.

     

    #3 Cascading from a map to a topic

     

    The same description and a long table mentioned above defines “Metadata inheritance between maps and topics” in the DITA 1.1 Architecture Spec. I don’t think we are making changes to this for DITA 1.2. But that discussion is about cascading of metadata elements more than it is about cascading of attribute values.

     

    Cascading of attribute values from maps to topics is not so well defined in DITA 1.1 and we are trying to do a better job for DITA 1.2.

     

    One approach is to use the concepts outlined for cascading of metadata elements and apply them to the cascading of attribute values from maps to topics. Here are the high level concepts outlined for map to topic element cascading in the DITA 1.1 spec.:

    For each element in the topicmeta, the following table provides different behaviors.

    * How does it apply to the topic? This describes how the metadata in a topicref interacts with the

    specified topic. In most cases, the properties are additive, within the current context. For example, when

    an audience is set to userwithin a topicref, this means that the audience for the specified topic is

    userwhen viewed within this context. This is in addition to any audience values specified within the

    topic, and does not apply to the topic when it is viewed in other contexts.

    And most of the entries in this column of the table say “Add to the topic”, but a few say “Replace the one in the topic” and “Not added to the topic; applies to links created based on this occurrence in the map”. And I take “additive”, “in addition to”, and “add to” to mean what I have been calling merge.

     

    It is probably better to think and talk about elements and attributes as defining properties where the properties cascade from maps to topics.

    From the section on “Topic properties in topics and maps” in the DITA 1.1 Architecture Spec:

    The properties of a topic (including metadata attributes and metadata elements) can be specified in the

    topic itself or in references to the topic within maps.

    . . .

    If a property is set in both the map and topic, the map properties are additive if the property (such as the

    audience type) takes a list of values. If, instead, the property (such as the importance) takes a single

    value, the map property overrides the topic property.

     

    The idea is that properties defined by elements or attributes in a map cascade from that map to the top element in a referenced topic or to all of the top topic elements in a ditabase. And then within the referenced topic(s) cascading follows the rules outlined for cascading within a topic (#4). The list of attributes that cascade from maps to topics is the same as the list that cascades from maps to maps.

     

    While @base and attributes specialized upon @base do not cascade within maps or topics, it is unclear if @base or a specialization based upon @base cascades from a map to a topic or not. I’m guessing that they should.

     

    #4 Cascading within a topic.

     

    I had thought that this was already well defined as part of DITA 1.1 and I don’t think we are making any changes for DITA 1.2, but the DITA 1.1 Architecture Spec. really says very little about cascading within a topic.  However, there are some comments about this in the DITA 1.1 Language Spec.

    @scope: If no value is specified, but the attribute is specified on an ancestor within a map or within the related-links section, the value will inherit from the closest ancestor.

    @props and many other attributes: If no value is specified, but the attribute is specified on an ancestor within a map or within the related-links section, the value will inherit from the closest ancestor

    @type: Processed as if the target were of type topic, or inherited from an ancestor

    [this and a number of other descriptions don’t say the bit about “within a map or within the related-links section”, but I assume that that is implied -Jeff].

    <linkpool>: Attributes set on <linkpool> are inherited by its descendants. For example, if you’ve got a <linkpool> that contains all external links, you can set scope=externalon that outer<linkpool> element and leave it off the links it contains.

     

    I assume, but haven’t checked, that the list of attributes that cascade within the related-links section in a topic is the same as the list of attributes that cascade within a map (#1) to the extent that the same attributes occur in both places.

     

    @base, attributes specialized upon @base, @status, and @importance do not cascade within a topic or a map.

     

    So attribute values that cascade only cascade within the related-links section of topics and then they never merge or override, but they always supply default values for attributes that don’t have explicit values and which do not have default values assigned in the DTD or Schema.

     

    #5 Cascading as part of conref processing.

     

    This is already well defined in the DITA 1.1 Architecture Spec. and I don’t think we are talking about any changes for DITA 1.2. In this case attribute values override and never merge between the conref source and target elements and once conref processing is complete, attribute values cascade or not within the conref section according to the regular cascading rules (#1 and #4).

     

    There are special rules for @xml:lang, @dir, and @translate which are described in the DITA 1.1 Architecture Spec.

     

         -Jeff