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: Wondering about specentry / spectitle attributes


Hi,

One comment on the latest attribute review in Ditaweb indicated that the specentry attribute on simple table entries is hard to understand. The same comment applies to spectitle, which is available more widely. Both are listed as "not for use by authors" and are meant to be set in grammar files. I've been frustrated by them in the past and wonder if we should remove them from 2.0.

The original idea behind each of these is that you can create a specialized DTD/RNG file that sets default or fixed values for a new specialized element. For example, you can create a specialized section called <productDetails> with a default attribute spectitle="Product details". That default value then becomes the default title for the specialized section.

For specentry, you would create a specialized simpletable entry like <proptypehd> that sets a default attribute of specentry="Property type". In this case, if you use the element but leave it empty, that becomes the default value.

This presents a few problems:
  1. It's hard-coding natural language as a default attribute value in a grammar file. If your content is translated, either you need to translate your grammar file, or override your processing to use that title as a token for localization.
  2. Spectitle is available on a bunch of elements that do not allow titles (<dl>, <lines>, <note>, <ol>, <pre>, <sl>, <ul>). Even if used as intended, this means a specialized element can declare a title for an element that doesn't allow a title. If not used as intended, it is a translated attribute in the source file, again adding a title where <title> is not allowed.
  3. Any scenario that involves localization requires that this attribute become a token that is then used by processors to insert a localized string. If this is part of a specialization (which is how we define it in the spec), generating a string based on the element rather than the attribute is comparable in terms of effort - and is how you would handle the same thing on any element without spectitle.
Do we need to keep these attributes in DITA 2.0? I only see a couple uses for it today, but might be missing some:
  1. Single-language publishing where someone is creating a grammar file with default title on an element, but is unable or unwilling to override processing for that element.
  2. Someone is using the attribute directly in source to specify a title for an element that does not allow titles. We have removed all attributes with natural language, so this would be the only translatable attribute in the source.
Thanks,
Robert







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