OASIS Darwin Information Typing Architecture (DITA) TC

 View Only

RE: [dita] conditional processing - inheritance case

  • 1.  RE: [dita] conditional processing - inheritance case

    Posted 04-21-2006 17:25
     MHonArc v2.5.0b2 -->
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    dita message

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


    Subject: RE: [dita] conditional processing - inheritance case


    The AND/OR logic for existing attributes is:
    Within an attribute, exclude only if all values are set to exclude
    Between attributes, exclude if any attribute evaluates to exclude.
    
    My understanding is that the same will apply for specialized values,
    regardless of whether they are generalized. So, if all of the values within
    opsys evaluate to "exclude", then the element will be excluded. So, if
    "linux" is set to exclude, it will be excluded in any of these cases:
    1. <p platform="intel" opsys="linux">
    2. <p platform="intel opsys(linux)">
    3. original syntax: <p props="platform(intel opsys(linux))">
    4. simplified syntax: <p props="platform(intel) opsys(linux)">
    
    Likewise, if you set platform="intel" to exclude, all of these would be
    excluded. This is clear in the first sample, and less clear in the second.
    For the third and fourth - I think the fourth is much easier to understand.
    After all, if you understand the logic for #2, then you also understand the
    logic for #4. The logic is:
    * If there are no parenthesis in an attribute, evaluate as today
    * For any value that uses parenthesis, such as opsys(linux windows),
    evaluate as one attribute
    * For any value that contains "sub-attributes" like #2 above, ignore those
    sub-attributes when evaluating the current one.
    
    The logic is the same as in Michael's original proposal, but it's easier to
    read and implement because you don't have to evaluate using recursion.
    
    Of course - I see that Paul is working on another proposal related to this
    attribute issue, so that one could render this proposal moot...
    
    Robert D Anderson
    IBM Authoring Tools Development
    Chief Architect, DITA Open Toolkit
    (507) 253-8787, T/L 553-8787
    
    
                                                                               
                 "Esrig, Bruce                                                 
                 (Bruce)"                                                      
                 <esrig@lucent.com                                          To 
                 >                         Robert D                            
                                           Anderson/Rochester/IBM@IBMUS,       
                 04/21/2006 11:57          Michael Priestley                   
                 AM                        <mpriestl@ca.ibm.com>               
                                                                            cc 
                                           dita@lists.oasis-open.org           
                                                                       Subject 
                                           RE: [dita] conditional processing - 
                                           inheritance case                    
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
    
    
    
    
    Is there AND/OR logic in the instance, or just in the DITAVAL file?
    
    In the original, the values are in different attributes. In the generalized
    1 level version, the values are in the same attribute.
    
    original form: <p platform="intel" opsys="linux">
    generalized 1 level: <p platform="intel opsys(linux)">
    
    Is it possible that (at least internally) we need explicit AND/OR operators
    inside the values in order to preserve the meaning of the expression?
    Commas and perhaps parens would be sufficient if they are needed.
    
    Best wishes,
    
    Bruce