Generating XHTML for Confluence 4.2

I've upgraded to MIF2Go 4.0 and am working on getting XHTML output to import into Confluence 4.2. Here's the documentation on the format:

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

In this first phase of the project, I'm just pasting the MIF2Go-generated XHTML page by page into the Confluence Source Editor:

https://plugins.atlassian.com/1210722

Once I get that working, I hope to figure out how to convert a whole document and pipe it into Confluence using the Remote API.

I'm about 90% done with the first phase. How do I do the following?

Map one FrameMaker character tag to two XHTML tags, for example, code + strong or code + em?

Suppress e.g. <a id="Rab16333" name="Rab16333"> in headings?

Suppress <span> tags everywhere?

FYI the <ol type="1"> and <li value="1"> approach is invalid in Confluence 4.2, but when I save the source Confluence strips out the type and value.

AttachmentSize
current mif2htm.ini2.44 KB

Split files not referenced by Confluence style links

When I use the "ConfluenceLinks = Yes" set of options, I get Confluence style links for xrefs to content in the output xhtml file. However, references to content in a split out file are standard hrefs and not Confluence style links. So, when I cut and paste into links to content that was split into what I want to make a child page do not work.

What can I do to make those links to content in split out files be Confluence style links?

used an after script to fix links

Hello All,

So, I guess I am a bit dim, and, I regret, rather new to mif2go. In any case, I never got the Confluence links configuration stuff to work. Instead, I just generated normal XHTML FrameMaker, and then I applied a script to the output so that it would transform the in-document href entries to Confluence links. It might not have been the smartest solution, but I am pressed for time.

In the months to come, I hope to explore better options, but, for now, I must use what I have figured out to date.

Thanks. 98% there. The

Thanks. 98% there. The redesign and updated documentation really speed up this kind of work.

How do I suppress the XML version, doctype, head, and body elements?

I have these settings:

[CharStyles]
Superscript = sup
[HtmlStyles]
Superscript = plain

but I'm still getting

<sup></sup><sup><sup>Superscript</sup></sup>

Headless XHTML

You asked: How do I suppress the XML version, doctype, head, and body elements?

[HTMLOptions]
UseXMLDeclaration=No
UseDOCTYPE=No
UseHeadAndBody=No

As to the superscript, I'm not clear on what you want. If you just want it (and similar typographic elements) to go away, try removing it from [CharStyles] and setting:

[Typographics]
UseTypographicElements=No

See par. 21.7.2, "Choosing how to treat typographic elements" for more possibilities.

superscript

I want to get rid of the superfluous <sup> and </sup> tags. I'm getting three pairs per occurrence rather than one.

Minimizing sup tags

OK, if you still want to keep one set of <sup> tags, try this:

[CharStyles]
Superscript = sup

[Typographics]
UseTypographicElements=No

and remove:

[HtmlStyles]
Superscript = plain

If you are concerned about the leading <sup></sup> pair, that may be unavoidable, but it is harmless.

duplicate <code> tags

moving to new thread

Tuning for Confluence

You asked: How do I do the following?

1. Map one FrameMaker character tag to two XHTML tags, for example, code + strong or code + em?
Use [HTMLStyles] CodeBefore and CodeAfter (or CFodeStart and CodeEnd). For example:

[CharStyles]
MyBoldCode=code

[HTMLStyles]
MyBoldCode=CodeBefore CodeAfter

[StyleCodeBefore]
MyBoldCode=<b>

[StyleCodeAfter]
MyBoldCode=</b>

2. Suppress e.g. <a id="Rab16333" name="Rab16333"> in headings?

No way to do it just for headings, but this will remove them all, which will force all links to go to the top of the page:

[HTMLOptions]
RemoveANames = Yes

3. Suppress <span> tags everywhere?

[CSS]
UseSpanAsDefault=No