Hi,

You're right, Hussein. I was confused because I could only find this topic
in DITA specification, about condicional processing, and it didn't clarify
me the way I needed:
http://docs.oasis-open.org/dita/v1.2/os/spec/archSpec/conditional-processing-attributes.html#conditional-processing-attributes

Thanks for your help.

2015-10-09 17:14 GMT+02:00 Hussein Shafie <[email protected]>:

> On 10/09/2015 11:37 AM, Ignacio García Soblechero wrote:
>
>> Hello,
>>
>> I'm rebuilding my product's documentation so it's better structured. For
>> this reason, Where I had one sublevel of ditamaps and every conditional
>> processing attibute in each topic, now I'm having two or even three
>> levels of ditamaps and some of the conditional attributes (I use mainly
>> audience, although others may be used later) are moved to the ditamap,
>> so I can exclude or include several files (the corresponding branch of
>> the index tree) with only one declaration.
>>
>> I'm having problems with this workaround. Here I give you an example of
>> something that doesn't work as I expect:
>>
>> map1.ditamap:
>> ...
>> <topicref format="ditamap" href="map2.ditamap"/>
>> ...
>>
>> map2.ditamap:
>> ...
>> <topicref format="ditamap" href="map3.ditamap" audience="role1 role2"/>
>> ...
>>
>> map3.ditamap:
>> ...
>> <topicref href="topic.dita" audience="role3"/>
>> ...
>>
>> val.ditaval:
>> ...
>> <prop action="include" att="audience" val="role1"/>
>> <prop action="include" att="audience" val="role2"/>
>> <prop action="exclude" att="audience" val="role3"/>
>> ...
>>
>> I suppose this example should work as follows:
>>
>>  1. ditac processes map1.ditamap. It finds map2.ditamap, that hasn't got
>>     any conditional processing attributes, so it reads it.
>>  2. ditac processes map2.ditamap. It finds map3.ditamap, that has a
>>     conditional processing attribute, audience, with values role1 and
>>     role2. As both values are included in val.ditaval, it reads
>>     map3.ditamap (this would work also if only one of the values were
>>     included and the rest excluded).
>>  3. ditac processes map3.ditamap. It finds topic.dita, that has a
>>     conditional processing attribute, audience, with value role3. This
>>     value is excluded in val.ditaval, so it should be not processed.
>>     Here lies my problem: it is processed.
>>
>> Is there any failure in my example? Have I forgotten anything? Is there
>> any bug there? I can't find where's the problem.
>>
>>
> I would say that ditac is conforming to the DITA spec in the above use
> case.
>
> The "audience" attribute is additive and cascade from map to map. See
>
> 2.1.2.3.5 Map-to-map cascading behaviors
>
>
> http://docs.oasis-open.org/dita/v1.2/os/spec/archSpec/map-to-map-cascading-of-metadata.html#map-to-map-cascading-of-metadata
>
> Therefore by specifying:
>
> ---
> <topicref format="ditamap" href="map3.ditamap" audience="role1 role2"/>
> ---
>
> and in map3.ditamap:
>
> ---
> <topicref href="topic.dita" audience="role3"/>
> ---
>
> You end up with the equivalent of:
>
> ---
> <topicref href="topic.dita" audience="role1 role2 role3"/>
> ---
>
> Hence topic.dita is included by ditac in the realized document.
>
>


-- 
[image: NeuroMobile] <http://www.neuromobilemarketing.com>Ignacio García
SoblecheroSoftware QA Engineer@igsoblecheroT. 968 27 78 43 • M. 664
489 616Parque
Científico Murcia. Edificio TPlanta 2, Mod. 1. Murcia, España[image:
linkedin] <https://www.linkedin.com/in/igsoblechero>[image: twitter]
<http://twitter.com/igsoblechero>[image: logo]
--
XMLmind DITA Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/ditac-support

Reply via email to