### 22.10 Generating XHTML for Confluence 4.x

XHTML output that will work as input to Confluence requires a different syntax for links, and several special settings. Thanks to research by Robert Lauriston, DITA2Go provides a way to produce the required markup. See:

https://confluence.atlassian.com/display/DOC/Confluence+Storage+Format

To direct DITA2Go to produce XHTML for Confluence 4.x:

[HTMLOptions]
; Confluence = No (default, use normal linking)
; or Yes (make Confluence links)
Confluence = Yes

When Confluence=Yes, DITA2Go automatically sets the options listed in Table 22-2. You can override these individually if necessary.

Table 22-2 Default options for Confluence 4.x XHTML

Configuration section | Setting | Value | Reference
[HTMLOptions] | ConfluenceLinks | Yes | 22.10
RemoveANames | Yes | 23.4
NoLocations | Yes | 28.3.2
NoFonts | Yes | 30.6.3
UseHash | No | 23.4
AlignAttributes | No | 30.4
UseXMLDeclaration | No | 22.4.7
UseDOCTYPE | No | 22.4.1
UseHeadAndBody | No | 22.4.7
[CSS] | UseCSS | No | 31.4.1
UseSpanAsDefault | No | 31.7.3

To configure Confluence links:

[HTMLOptions]
; ConfluenceLinks = No (default, use normal links)
; or Yes (use the link parts specified below)
ConfluenceLinks = Yes
; These are the default parts for Confluence links:
ConfluenceLinkStart = <ac:link>
ConfluenceLinkPage = <ri:page ri:content-title="
ConfluenceLinkPageEnd = "/>
ConfluenceLinkText = <ac:link-body>
ConfluenceLinkTextEnd = </ac:link-body>
ConfluenceLinkEnd = </ac:link>

When ConfluenceLinks=Yes, the remaining ConfluenceLink* settings are in effect.

Note: The XHTML files you produce with DITA2Go must be imported into Confluence one at a time. As of this writing, no batch import utility is available.

Previous Topic: 22.9 Providing hover text for links in HTML

Next Topic: 22.11 Exporting content for database input

Parent Topic: 22. Converting to HTML/XHTML

Sibling Topics:

22.1 Deciding which type of output to produce

22.2 Setting up an HTML project

22.3 Including starting code and entity references

22.4 Supplying values for the <head> element

22.5 Specifying HTML <body> attributes

22.6 Specifying document-wide properties for HTML

22.7 Defining text colors for HTML

22.8 Importing HTML files as insets

22.9 Providing hover text for links in HTML

22.11 Exporting content for database input

22.12 Specifying a starting topic for HTML or XHTML

22.13 Using framesets

22.14 Passing W3C validation tests

Table of Contents • Index