[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [dita] Groups - DITA 1.1 #9 (2): element for properties and embeddeddata (Issue9.html) modified
Hi, Bruce:
Good issues for probing the design -- I've some responses.
1. User-defined data
Like the existing <state> element, the <data> element provides a name attribute for this purpose. In fact, it's probably a best practice for specializers to provide a default name and offer the users of their specialization the ability to add user-defined precision to their specialization.
<data name="product-family" value="Everything Anyone Could Want">
<data name="product" value="This Most Valuable Product">
<data name="model" value="At Your Price Point">
<data name="configuration" value="With Your Features">
<data name="feature">Feature One</data>
<data name="feature">Feature Two</data>
</data></data></data></data>
<data name="recipe">
<data name="ingredients">
<data name="ingredient">Any starch</data>
<data name="ingredient">Any topping</data>
</data>
<data name="item served">Food consisting of starch with topping</data>
</data>
In the examples, I've moved the parent values into the value attribute because, as Dana pointed out in correspondence, the purpose of the <data> element is to arrange atomic values in structures. Thus, the best practice for specializers and users is to avoid mixed content models.
Of course, as with any pattern that isn't encoded by the markup, the consistency of the instances of the product and recipe data structures depends entirely on the diligence of the writers. Better than nothing, and the patterns could be validated with Schematron (though that would be about as complex as specialization with less benefit).
The outputclass (aka, the poor man's specialization) can also be used for sharing a semantic across multiple instances, but I think you'd want the ability to apply the same outputclass to multiple named values, so it wouldn't specify user-defined types for data.
2. Referring to instances
The <data> element would use the same referencing mechanisms (including the new keyref) as any other DITA element to become the target or source of a refererence:
<topic id="thisTopic">
...
<prolog>
<author id="topicAuthor">Charles Schulz</author>
<data name="profession" abouthref=""#thisTopic/topicAuthor">cartoonist</data>
</prolog>
This example assumes that the universal attributes has provided an id on <author> so the instance can be referenced.
I think the initial scenario (specifying a default author) would be addressed through conref or by specifying the author at the root of a branch in the map.
The example does make me wonder whether metadata elements that take content (like <author>) should add <data> to their content models so extended properties can be nested instead of referential.
3. Rebasing existing properties on <data> in DITA 2.0
Excellent point about extending DITA modularity to the existing topic metadata -- that is, moving the existing topic properties into a pluggable domain. As an additional benefit, that would make those properties easier to share between topic and map.
The hitch for rebasing on the <data> element is the existing attributes of the properties. We'd need extension by addition for attributes or attribute specialization / mutability. But, those are good goals for DITA 2.0 anyway.
4. Filtering based on the <data> element
In XSLT, you could create a filtering rule like the following:
<xsl:template match="*[contains(@class,' topic/topic ')] //
*[contains(@class,' topic/data ') and name='recipe'] /
*[contains(@class,' topic/data ') and name='ingredients'] /
*[contains(@class,' topic/data ') and name='ingredient' and
contains(text(),'starch')]"/>
That would drop any topic with a recipe that uses starch. You'd also need to filter out the references to the topic, but the strategy would be similar.
Thanks for digging into it,
Erik Hennum
ehennum@us.ibm.com
"Esrig, Bruce (Bruce)" <esrig@lucent.com>
09/07/2005 03:26 AM |
|
Hi, Esteemed DITA Commmittee Members:
Regarding the <data> element proposal
09/06/2005 11:24 AM |
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]