DITA 2.0 preview support
DITA Open Toolkit 4.0 provides a preview of features for the upcoming OASIS DITA 2.0 specification. This preliminary processing support is provided on the basis of the latest drafts of the DITA 2.0 DTD and RELAX NG grammar files from OASIS (as of November 7, 2022).
DITA documents that reference the draft grammar files can be parsed, and where features overlap with DITA 1.3, those features will work as expected.
DITA-OT 3.5
DITA-OT 3.5 provided an initial preview of DITA 2.0 features.
-
The new
include
element can be used to reference text or XML content from other files. In addition to the processing mandated by the specification, DITA-OT also supports the character set definition and line range extraction options previously provided forcoderef
elements (see Extended codeblock processing). -
The new
@specializations
attribute, which replaces the DITA 1.x@domains
attribute, can now be used as an alternative method of declaring specialized attributes. -
The
@outputclass
attribute can now be specified as a flagging behavior in DITAVAL files. This allows you to flag an element with a CSS class keyword that will be added to the@class
attribute value in the generated HTML. Output classes allow you to pick up pre-defined styles from existing web frameworks, and are more easily overridden with custom CSS files than the inline@style
attributes generated by DITA 1.x flagging options such as@color
and@backcolor
. -
Titles can now be specified on simple tables, and
simpletable
entries now support row and column spanning attributes. -
Where DITA 1.x defined conflicting
@class
values forlinktext
,shortdesc
, andsearchtitle
in maps and topics, the new draft of DITA 2.0 uses the topic-based@class
value in all cases. Processing is updated to recognize the updated value when these elements are used in maps.
DITA-OT 3.6
DITA-OT 3.6 added support for additional DITA 2.0 features.
- Where earlier DITA versions relied on the
object
element to embed media in DITA source files, DITA 2.0 provides newaudio
andvideo
elements that correspond to their HTML5 equivalents. - For HTML5 compatibility, the new emphasis domain adds support for the
strong
andem
elements in addition to the existingb
andi
elements in the highlighting domain. - The troubleshooting domain has been updated with additional constructs that can be used to provide detailed diagnostic information.
- Several obsolete elements and attributes have been removed from DITA 2.0, including:
boolean
data-about
indextermref
@alt
onimage
@navtitle
ontopicref
@query
ontopicref
@refcols
onsimpletable
@xtrc
@xtrf
DITA-OT 3.7
DITA-OT 3.7 added support for additional DITA 2.0 features.
-
The new “combine” chunk action can be used to merge content into new output documents.
When the
@chunk
attribute is set tocombine
on a map, branch, or map reference, all source DITA documents grouped by that reference will be combined into a single document in the output.(Support for the DITA 2.0 “split” chunk action has not yet been implemented.)
Note: The new chunk action is only applied if the root map has a DITA 2.0 doctype, such as:
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA 2.0 Map//EN" "map.dtd">
If the root map uses an unversioned (or 1.x) doctype, DITA 1.3 processing will be applied, and 2.0 chunk actions will be ignored. With a 2.0 root map, any 1.3 chunk actions are ignored.
-
The new
keytext
element can be used to define variable text referenced by@keyref
. Although the DITA 2.0 grammar files in this release support the use ofkeytext
in authored files, DITA-OT 3.7 does not yet have processing support for the element. - The new alternative titles domain and
titlealt
element (separate from thetitlealts
element in DITA 1.3) may be used when you need to use an alternate title, such as for a navigation title, search title, link title, subtitle, or title hint. - The new
@appid-role
attribute is available onresourceid
. The default iscontext-sensitive-help
. - The
@keyref
attribute was added to all elements in the highlighting domain and the new emphasis domain. - The
@href
,@format
, and@scope
attributes are now used consistently for linking elements. - Several obsolete elements and attributes have been removed from DITA 2.0, including:
anchor
anchorref
data-about
hasInstance
hasKind
hasNarrower
hasPart
hasRelated
longquoteref
relatedSubjects
sectiondiv
subjectRel
subjectRelHeader
subjectRelTable
subjectRole
@anchorref
frommap
@copy-to
@href
,@format
,@type
,@scope
,@reftitle
fromlq
(@keyref
remains)@locktitle
@longdescref
@mapkeyref
@print
@query
@specentry
fromstentry
@spectitle
DITA-OT 4.0
DITA-OT 4.0 adds support for additional DITA 2.0 features.
-
The new “split” chunk action can be used to break content into new output documents. #3942
When the
@chunk
attribute is set tosplit
on a map, branch, or map reference, each topic from the referenced source document will be rendered as an individual document.Note: The new chunk action is only applied if the root map has a DITA 2.0 doctype, such as:
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA 2.0 Map//EN" "map.dtd">
If the root map uses an unversioned (or 1.x) doctype, DITA 1.3 processing will be applied, and 2.0 chunk actions will be ignored. With a 2.0 root map, any 1.3 chunk actions are ignored.
Note: Other new or revised features proposed for DITA 2.0 are not yet supported. Additional features will be implemented in future versions of DITA-OT as the specification evolves.
Tip: For the latest status information on DITA 2.0-related features and fixes, see the DITA 2.0 label in the GitHub issues tracker.
Related information