Consider making most universal attributes completely universal
DITA contains a parameter
entity named univ-atts, which is used to add universal attributes to most
elements. Some elements do not have these attributes, which leads to user
confusion and means that common actions (such as conref) cannot be used everywhere.
subject was raised in the November 30, 2004 TC meeting, although the minutes
do not give much of the discussion (http://lists.oasis-open.org/archives/dita/200412/msg00002.html).
Trivial - add pre-defined attributes
to elements that do not have them.
- It is possible to specialize documents today, and set a default or fixed
value to indicate whether an element can be translated. The translate attribute
is missing from several elements; adding it would (for example) make it possible
to declare that your title, table entry, or link text should or should not
be translated. These elements also are unable to set the xml:lang value today.
- Users expect that filtering attributes should be available on every element.
Adding %select-atts; to elements that do not have them will meet user expectations
and prevent confusion. It will also allow filtering where it is not possible
today; for example, indicating that a row of links in a reltable only applies
in some situations. In addition you will be able to flag items that cannot
be flagged today, such as a topic title or short description.
- Adding id and conref to elements which do not have them makes reuse possible
in more locations. For example, a common set of links can be reused in several
topics by adding the attributes to linklist or linkpool. It is also possible
to reuse common metadata such as copyright, author, and publisher without
redefining them in several topics.
DTD and Schema changes.
The following attributes are part of univ-atts:
- %id-atts; (@id, @conref)
- %select-atts; (@platform, @product, @audience, @otherprops, @importance,
The following elements need to get new attributes:
- topic: Add @translate. Cannot reuse the %univ-atts; parameter entity because
@id is required.
- title: Add translate, @xml:lang. Leave select-atts off, so that users
may not filter out the required topic title
- titlealts, navtitle, searchtitle: Replace id-atts with univ-atts.
- shortdesc, desc: Replace id-atts with univ-atts.
- body: Replace id-atts, translate, and xml:lang with univ-atts.
- prolog, metadata, tm, param: add univ-atts.
- related-links, link, linklist, linkpool: replace select-atts with univ-atts
- linktext, linkinfo: add univ-atts
- entry: Add @translate and @xml:lang to the existing id-atts.
- colspec: Add @translate, @xml:lang, and id-atts. A future consideration
would be adding @outputclass, which is available on all of the other table
elements. This could be used to give an outputclass to each entry in a column.
- Note: Each of those is still missing select-atts. These were intentionally
left off, because of the difficulties involved in processing and editor display.
- Add univ-atts to these elements: author, source, copyright, copyrholder,
critdates, created, permissions, prodname, vrmlist, vrm, brand, series, platform,
prognum, featnum, component, resourceid
- Replace select-atts with univ-atts on these elements: publisher, copyrholder,
revised, category, audience, prodinfo
- keywords: Replace id-atts and select-atts with univ-atts
- othermeta: Replace select-atts with univ-atts (note that this means having
both @translate and @translate-content.
- task: same as <topic>
- taskbody: Leave alone (missing select-atts), so that users cannot filter
on a required element
- step, substep: uses univ-atts-no-importance, so that importance can be
- chhead: Missing @importance; replace univ-atts-no-importance-task with
- concept: same as <topic>
- conbody: Leave alone (missing select-atts), so that users cannot filter
on a required element
- reference: same as <topic>
- refbody: Leave alone (missing select-atts), so that users cannot filter
on a required element
- No change: just a note that 10 elements use univ-atts-no-importance and
redefine importance locally.
- Defines "univ-atts-translate-no", which is used by shape and coords. This
entity should include select-atts, rather than redefining every value from
- map: Only missing @conref. Replace @id, @translate, @xml:lang, and select-atts
- navref: Add univ-atts.
- topicref, reltable, relrow: These include everything explicitly. Replace
id-atts, select-atts, translate, and xml:lang with univ-atts for consistency.
- anchor: Add @conref, id-atts, and select-atts. Cannot reuse the %univ-atts;
PE because the element requires @id.
- relheader: Add univ-atts
- relcolspec: Only missing id-atts. Replace @translate, @xml:lang, and select-atts
- relcell: Only missing select-atts. Replace @translate, @xml:lang, and
id-atts with univ-atts.
- topicmeta, linktext, searchtitle, shortdesc: add univ-atts.
- topichead, topicgroup: missing @translate and @xml:lang. Replace @id,
@conref, and select-atts with univ-atts.
Elements which will still not have some universal
- <title> will still be missing select-atts, so that users may not filter
out the required topic title
- <entry> and <colspec> will still be missing select-atts, so that
users may not filter entries or columns out of a table. Allowing filtered
entries would cause problems in many CALS-based table renderers, where every
row must have the same number of entries.
- <conbody>, <taskbody>, and <refbody> will still be missing select-atts,
so that users may not filter out these required elements.
Less than a day to implement. DITA
implementations will need to be aware of the new attributes, but processing
rules are the same as on existing elements.
Consistency is one major benefit
- users can expect the same behavior on all elements. Usability is another
benefit - users will be able to use conref or filter any element. Most users
will make use of this at some point. This will have a medium level impact
on most users, who will simply see the expected behavior and not have to come
up with workarounds. It will have a major impact those users that wish to
filter or reuse metadata elements, because there is no simple way to do that
Less than a day to implement
and test DTD changes. Some DITA implementations may need to be updated to
handle new attributes.