In response to Chris Papademetrious' question about how passthrough should work in his use case, the question is:
From Chris:
The DITA 2.0 working spec describes the passthrough
action as follows:
Include the content in output, and preserve the attribute value as part of the output stream for further processing by a runtime engine, for example runtime filtering based on individual user settings. The value should be preserved in whatever syntax is required by the target runtime. Values that are not explicitly passed through should be removed from the output stream, even though the content is still included.
Let's say I have @audience
and @product
profiling, with @product
using a family(...)
attribute group. My DITA content has even and odd profiling values:
<!-- DITA -->
<p audience="A1 A2">...</p>
<p product="family(P1 P2)">...</p>
My DITAVAL applies passthrough
actions to only the even-numbered profiling values:
<val>
<prop att="audience" val="A2" action="passthrough"/>
<prop att="family" val="P2" action="passthrough"/>
</val>
Question 1: Does the last sentence of the passthrough
description above mean that the output should include only the passthrough
-matched values (even), with non-matched values (odd) being filtered out?
Question 2: Does the OASIS DITA TC have any guidance on how attribute/group names could be formatted in HTML5 output?
<!-- HTML5 output, option 1 -->
<p class="p" data-family="P2">...</p>
<!-- HTML5 output, option 2 -->
<p class="p" data-product="family(P2)">...</p>
My reading of the spec is:
Q1: Only the even values (A2 and P2) are passed through.
Q2: The result is implementation dependent
Chris actually raises an interesting question about how passthrough should work: Is it useful or required to preserve the specialization hierarchy of the attributes?
In Chris' example, the condition name "family" is an effective specialization of the condition name "product", equivalent to having defined the attribute @family as a specialization of @product (which will be allowed in DITA 2.0 because @product is itself a specialization of @props).
Thus, Chris' second HTML output option could make sense because it preserves the relationship between "family" and "product". But of course, the HTML details depend entirely on what might be interpreting the values in an HTML processing context (i.e., some in-browser JavaScript code).
Another option could be something like
<!-- HTML5 output, option 3 -->
<p class='p' data-specialization="(props product family)" data-family="p2"/>
As an implementor of HTML processing I would prefer the more direct data-family="p2" form because it would be easy to target with CSS selectors, so I think I would prefer options 1 or 3 over option 2.
Cheers,
E.
_____________________________________________
Eliot Kimber
Sr Staff Content Engineer
Digital Content & Design
O: 512 554 9368
M: 512 554 9368
servicenow.com
LinkedIn | Twitter | YouTube | Facebook