31.7.8 Using CSS class names
as tags for XML
By default, CSS class names become XML tags in XML
output:
[HTMLOptions]
; ClassIsTag = No (default for HTML/XHTML)
; or Yes (default for Generic XML)
When ClassIsTag=Yes, class names,
including those you assign to formats in the [ParaStyles] and [CharStyles] sections, become
XML tags. If ClassIsTag=Yes, also specify
[CSS]WriteClassAttributes=No;
see §31.4.1
Specifying CSS options in a DITA2Go configuration
file.
When ClassIsTag=No, HTML tags
and class names are assigned as described in §31.7.2
Mapping paragraph formats to CSS classes and §31.7.3
Mapping character formats to tags or span classes.
For example, suppose your document includes paragraph
formats Chap_Title, SubHead, Fig, and Body, with the
first two assigned HTML tags and the third assigned a class in [ParaStyles]. DITA2Go
would treat these formats as follows:
FM format
|
[ParaStyles]
|
ClassIsTag = No
|
ClassIsTag = Yes
|
Chap_Title
|
Chap_Title=H1
|
<h1 class="chaptitle">
|
<chaptitle>
|
SubHead
|
SubHead=H2
|
<h2 class="subhead">
|
<subhead>
|
Fig
|
Fig= class="caption"
|
<p class="caption"
|
<caption>
|
Body
|
(no setting)
|
<p class="body">
|
<body>
|
Previous Topic: 31.7.7 Using
link format names as CSS class names
Next Topic: 31.7.9 Omitting
tags from CSS selectors
Parent Topic: 31.7 Assigning CSS classes
Sibling Topics:
31.7.1 Understanding
CSS class name restrictions
31.7.2 Mapping
paragraph formats to CSS classes
31.7.3 Mapping
character formats to tags or span classes
31.7.4 Assigning
CSS classes to table formats
31.7.5 Assigning
CSS classes to text and table footnotes
31.7.6 Assigning
CSS classes based on Unicode character ranges
31.7.7 Using
link format names as CSS class names
31.7.9 Omitting
tags from CSS selectors
31.7.10 Overriding
CSS class for selected paragraphs