Douglas W Philips wrote:
> Following up from previous messages, but this is really a new (sub?)
> topic, I think.
> 
> We have several customizations of props (conditionals), and those are
> not treated the same as audience.

That's right. We don't understand the description of the "props" attribute:
---
props = Root attribute from which new metadata attributes can be
specialized.
---
Therefore this attribute is currently completely ignored by ditac.

To be frank, we don't understand anything related to attribute
specialization (or is it generalization?). We only understand element
specialization.

OTOH, we understand the description of the "otherprops" attribute:
---
otherprops = This attribute can be used for any other properties that
might be needed to describe an audience, or to provide selection
criteria for the element.
---
Therefore this attribute is currently fully supported by ditac and we
routinely use it for our own document publishing needs.

More about this below.




> As per the previous thread. audience conditionalization works in the map
> file.
> Our customizations do not (names changed to protect the innocent).
> 
> 
> sample.ditamap:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN"
> "http://docs.oasis-open.org/dita/dtd/map.dtd";>
> <map>
>   <title>Sample map</title>
> 
>   <topicref weebles="newbie" href="sample.dita"/>
>   <topicref weebles="experts" href="sample2.dita"/>
> </map>
> 
> 
> 
> sample2.ditaval:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <val>
>   <prop att="weebles" action="exclude"/>
>   <prop action="include" att="weebles" backcolor="#FFE0E0" val="newbie"/>
> </val>
> 
> 
> Just to show that the conditionals are being (somewhat processed), a
> revised sample.dita:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN"
> "http://docs.oasis-open.org/dita/dtd/topic.dtd";>
> <topic id="sample_topic">
>   <title>Sample topic</title>
> 
>   <body>
>     <p>The intended audience of this topic are newbies.</p>
>     <p weebles="experts">This paragraph should not appear.</p>
>   </body>
> </topic>
> 
> 
> 
> sample2.dita:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN"
> "http://docs.oasis-open.org/dita/dtd/topic.dtd";>
> <topic id="sample_topic2">
>   <title>Sample topic</title>
> 
>   <body>
>     <p>The intended audience of this topic are experts.</p>
>   </body>
> </topic>
> 
> 
> 
> 
> The command line:
> 
> /c/ditac-1_2_0/bin/ditac.bat -xfc
> c:/xfc_perso_java-4_3_2/bin/fo2docx.bat -filter sample2.ditaval 
> sample.docx sample.ditamap
> 
> The attached sample.docx shows that sample.dita is processed correctly
> (the second paragraph is indeed missing as it should be)
> the map is not and the sample2.dita contents are present.
> 
> We think this is a bug, (esp. in light of the previous thread where the
> map conditionals are processed when 'audience' is used.)
> 

May be it's a bug but we currently do not understand how this is really
supposed to work. Therefore we are not going to fix it.

If you replace attribute "weebles" by attribute "otherprops" everywhere
in your sample files, it will work exactly as expected. See attached files.

Ditac works like this:

* Standard conditional processing attributes ("platform", "product",
"audience", "otherprops", "rev"; *not* "props") declared on a topicref
are ``merged'' with those found in the corresponding topic.

* Standard conditional processing elements found in topicref/topicmeta
are ``merged'' with those found in the corresponding topic/prolog/metadata.

* Then the .ditaval file is applied to the ``augmented'' topic.

Now it's true that ditac allows to specify any attribute (including
"weebles") in the .ditaval file to perform conditional processing. This
explains why you have found it to partially work.

However ditac will not attempt to move attributes other the standard
conditional processing ones from the topicref to the corresponding
topic. This explains why it works fine with "otherprops" and not really
with "weebles".








-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample.dita
Type: text/xml
Size: 353 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/ditac-support/attachments/20100325/d994bbe7/attachment.xml
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample.ditamap
Type: text/xml
Size: 286 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/ditac-support/attachments/20100325/d994bbe7/attachment-0001.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/d994bbe7/attachment.pdf
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample2.dita
Type: text/xml
Size: 288 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/ditac-support/attachments/20100325/d994bbe7/attachment-0002.xml
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample2.ditaval
Type: text/xml
Size: 170 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/ditac-support/attachments/20100325/d994bbe7/attachment-0003.xml
 

Reply via email to