Following up on our conversation below, how horrible a project will it be to 
try to rewrite the processor to reorder the filtering and conreffing steps? Are 
the two functions, filtering and conreffing, modular enough that they could be 
swapped? Could you give an estimate of how much work it would require? Could we 
offer a bounty to you that would make it worth your while to fix? Could you 
give us pointers on how to approach the problem? We're stuck because our 
implementation was based on the behavior of the open toolkit and now we don't 
have a fallback strategy. The problem with your alternative solution is that we 
don't know for sure prior to the document rendering whether the audience 
specified will exist in any of the alternate titles so it could result in none 
of the titles being rendered.

Thanks,
Andy Orahood
IU Knowledge Base

Message: 1
Date: Thu, 23 Feb 2012 19:41:28 +0100
From: Hussein Shafie <[email protected]>
Subject: Re: [ditac] filtering and conrefs within a topic
To: "Orahood, Andy" <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 02/23/2012 04:32 PM, Orahood, Andy wrote:
> I have a mechanism in my files to replace the default title when the correct 
> audience is applied, that works like this:
> 
> <topic id="kbdoc">
>   <title id="default">test default title</title>
>   <prolog>
>     <data audience="ose">
>       <title conref="#kbdoc/default" conaction="pushreplace">test OSE 
> title</title>
>     </data>
>     <data audience="sakai">
>       <title conref="#kbdoc/default" conaction="pushreplace">test Sakai 
> title</title>
>     </data>
>   </prolog>
> 
> When I run this transformation, even when I have a ditaval that sets the 
> default action for conditional processing attribute "audience" to "exclude", 
> the conref is done for both the "ose" title and the "sakai" title, and 
> finally the "sakai" title is left in place of the default one. This is not 
> how the Open Toolkit behaves, nor how I would expect ditac to handle 
> filtering of conref content. I would expect that if the alternate titles are 
> filtered out then the conref should not be processed. Only if I use a ditaval 
> that makes the content in the data container for "ose" or for "sakai" visible 
> should the conref be processed.
> 

This is obviously a bug, but we cannot fix it without a major rewrite of 
ditac. (Conditional processing is performed by ditac after conref 
processing.)

I would suggest this (may be naive) alternative:

<topic id="kbdoc">
  <title><ph audience="default">test default title</ph>
         <ph audience="ose">test OSE title</ph>
         <ph audience="sakai">test Sakai title</ph></title>


 
--
XMLmind DITA Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/ditac-support

Reply via email to