Douglas W Philips wrote:
> After consulting:
> http://www.xmlmind.com/ditac/_distrib/doc/manual/limitations.html
> I wanted to clarify/ask-for-guidance on the future availability of
> filtering at the map/bookmap level. According to the DITA 1.1 spec, the
> correct way to make a topic conditional is to apply the conditional
> attribute to the topicref in the map file.

Well, to our knowledge this works to a certain extent. See attached sample.

However we cannot recommend to specify conditional processing elements
in the topicmeta child element of a topicref because there is no obvious
mapping between what's specified in the topicmeta child element  and
what is specified in the .ditaval file.

Sample map:
---
<map>
  <title>Sample map</title>

  <topicref href="sample.dita">
    <topicmeta>
      <audience othertype="newbie" type="other"/>
    </topicmeta>
  </topicref>
</map>
---

Sample .ditaval file:
---
<val>
  <prop action="flag" att="audience" backcolor="#FFE0E0" val="newbie"/>
</val>
---

If you happen to specify the audience differently in the map, there are
great chances that ditac will not be able to properly apply your
.ditaval file. This is not the case when you directly specify
conditional processing *attributes* on the topic and/or its descendant
elements. In other words, if you want it to work, keep it simple.

All the files which shows that the above sample works fine are attached
to this email.

File sample.pdf has been generated by running:
---
ditac -filter sample.ditaval  sample.pdf sample.ditamap
---

We are reluctant to document how topicmeta's conditional processing
child elements (such as audience) are converted/merged to/with topic's
conditional processing attributes and/or with topic/prolog/metadata's
conditional processing child elements because
[1] This should be *clearly* documented by the DITA spec.
[2] In our opinion, it's a mess.



> 
> Additionally/related, while that description of limitations indicates
> that it is possible to flag 'ph' elements, such conditionals are not
> processed when they occur in the map/bookmap file itself (as
> sub-elements of the title element, for example). We consider that a bug.
> Being able to conditionalize a title is required so that the title will
> match the conditionalized contents of the resulting document.   Previous
> experiments we did led us to believe this would work, but upon further
> investigation, that seems to have been the result of the title coming
> out of the first dita file, where conditional/filter processing is working.
> 

This is clearly a bug which will be fixed in next release of ditac.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample.dita
Type: text/xml
Size: 287 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/ditac-support/attachments/20100325/ff972a0b/attachment-0003.xml
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample.ditamap
Type: text/xml
Size: 307 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/ditac-support/attachments/20100325/ff972a0b/attachment-0004.xml
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample.ditaval
Type: text/xml
Size: 124 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/ditac-support/attachments/20100325/ff972a0b/attachment-0005.xml
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample.pdf
Type: application/pdf
Size: 8131 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/ditac-support/attachments/20100325/ff972a0b/attachment-0001.pdf
 

Reply via email to