DITAVAL content is not being used appropriately in Oxygen 11.2 when transforming to PDF using DITA-OT

Summary: DITAVAL content is not being used appropriately in Oxygen 11.2 What I’m doing: 1. I have a set of DITA tasks and concepts that are included in a Map file that is included in a Bookmap file. 2. The tasks and concepts have tags that use the audience attribute with a value set to the locale I want to include or exclude, such as audience=”US” or audience=”UK” 3. Some of the tasks and concepts use conrefs to other content that also includes the audience attribute set to the value I want. 4. In most cases I specify a single value for the audience. 5. In some cases, I specify multiple audiences such as <p audience="XML US">text goes here</p> for content that is for XML users in the US only. 6. I have a set of DITAVAL files that contain the include and exclude statements, such as <prop action="include" att="audience" val="US" /> and <prop action="exclude" att="audience" val="UK" />. They also contain include/exclude statement for other values such as <prop action="exclude" att="audience" val="XML" />. 7. My Oxygen Transform refers to the DITAVAL file I want to use. I specified it by browsing to it in the dialog box so the path is correct. 8. At transform time, the DITA-OT transforms the content into a PDF. This all works fine in that the file builds. However, the audience attribute for “US” or “DE” or whatever is not being respected for the transform, while the audience attribute for the other values (such as audience=”XML” or audience=”HTML”) is working. A. I’m at a loss to figure out what is causing the problem. Is it specifying more than one value in the audience (line 5, above)? Is this not the right way to specify multiple audiences? B. Is the problem that I’m specifying a value to include (XML) and a value to exclude (US) in the same tag (see line 5, above)? If (B) is true, then how would I specify content that should be included for XML users, but only if they're in the US? I have multiple users (XML, HTML, PHP, and so on) and multiple locales (UK, US, DE, and so on). I'm probably missing some very obvious feature of DITA, but that goes without saying.

On Fri, 2 Jul 2010 10:42:42 -0700, Steve Matlock <stephenmatlock@gmail.com> wrote:
5. In some cases, I specify multiple audiences such as <p audience="XML US">text goes here</p> for content that is for XML users in the US only. ... However, the audience attribute for “US” or “DE” or whatever is not being respected for the transform, while the audience attribute for the other values (such as audience=”XML” or audience=”HTML”) is working.
A. I’m at a loss to figure out what is causing the problem. Is it specifying more than one value in the audience (line 5, above)? Is this not the right way to specify multiple audiences?
That is correct syntax.
B. Is the problem that I’m specifying a value to include (XML) and a value to exclude (US) in the same tag (see line 5, above)?
Yes.
If (B) is true, then how would I specify content that should be included for XML users, but only if they're in the US? I have multiple users (XML, HTML, PHP, and so on) and multiple locales (UK, US, DE, and so on).
The default DITA rule is that iff *all* values in any *one* attribute are excluded, the element is excluded; otherwise the element is included. You can set the opposite default, but that will not help you here. Your basic problem is that you are using the same attribute for two sets of values, output (XML, HTML) and locale (DE, US). You need a separate attribute for each such set of values, to prevent exactly the problem you have encountered. The correct DITA way to handle this is to specialize an attribute from props for *each* such domain for which you need to select. Since one of the domains is locale, though, you might have a quick fix by using the xml:lang attribute for that (DE, EN-us, EN-uk, etc.). Some tools, including DITA2Go, allow you to filter on any attribute, not just those derived from props. Again, this is not prohibited by the DITA spec, but is not considered a best practice by purists. HTH! HTH! -- Jeremy H. Griffith <jeremy@omsys.com> DITA2Go site: http://www.dita2go.com/
participants (2)
-
Jeremy H. Griffith
-
Steve Matlock