
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/