OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

dita message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Cascading / inheritance of default values



A question came up when writing up the Controlled Values proposal, and Erik
Hennum suggested I take it to the TC list. I realize it's too late for
today's call, but hopefully this will get discussion started.

The controlled values proposal allows you to select values that are valid
in a given attribute - for example, you can provide an enumeration for the
audience attribute. At the same time, you can specify a default value from
the enumeration.

This raises a question about cascading attributes. In a map, many
attributes (like audience) cascade to nested topicrefs. If a default value
for @audience is set in the DTD, this means it applies everywhere - parsers
see it the same as a specified value, it is the clear default for every
instance of the element. So, setting a value on the topicref will not
override nested topicrefs, because they pick up the default.

What happens if a default is specified through a controlled values file? In
that case, there is a default, but it is a processor controlled default. It
will not show up in a file unless / until a processor reads the file,
determines the default, and then applies it.

So - assume that I have a controlled values file which defines a default of
audience="us" among the valid values (us | them | everybody). What audience
applies to the following topics?
<map>
  <!-- First pull in the controlled values -->
  <topicref href="values.ditamap" format="ditamap"/>
  <topicref href="a.dita">
    <topicref href="b.dita" audience="them">
      <topicref href="c.dita"/>
    </topicref>
  </topicref>
</map>

Topic A will have audience="us", topic B has audience="them", what does
topic C have?

Thanks -

Robert D Anderson
IBM Authoring Tools Development
Chief Architect, DITA Open Toolkit
(507) 253-8787, T/L 553-8787 (Good Monday & Thursday)



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]