Skip to content

Convert the plugin pages to Markdown using code blocks - #578

Merged
slachiewicz merged 1 commit into
masterfrom
docs/xdoc-codeblocks
Aug 8, 2026
Merged

Convert the plugin pages to Markdown using code blocks#578
slachiewicz merged 1 commit into
masterfrom
docs/xdoc-codeblocks

Conversation

@slachiewicz

@slachiewicz slachiewicz commented Aug 8, 2026

Copy link
Copy Markdown
Member

Part of codehaus-plexus/.github#58. All nine plugin pages, following your point that those <li><code> blocks are really code snippets so the inline formatting isn't needed.

You were right, and it reverses the conclusion I reached in #576.

Three commits — please merge or rebase, don't squash, so git log --follow survives the renames.

Why the straight conversion failed

The xdoc marked up method signatures as inline HTML inside a list:

<li><code>public void write( OutputStream output, <i>RootClass</i> root )<br/>
    &#160;&#160;&#160;&#160;throws SAXException, TransformerException</code></li>

Markdown has no syntax for emphasis inside a code span, so doxia-converter emitted `_RootClass_` — underscores rendering literally — and turned each <br/> into a backslash plus a blank line, which closed the list and dumped the rest as plain text.

Treating them as code instead

public void write( OutputStream output, RootClass root )
        throws SAXException, TransformerException

// opens and closes the XML document
public void write( ContentHandler handler, RootClass root )
        throws SAXException

Real monospace, real indentation instead of &#160; runs, and the parenthetical asides become comments on the method they describe.

What is deliberately lost

The <i>/<b> marked which parts of my.model.package.io.sax.ModelNameSAXWriter come from your model and which are literal. A code block can't carry that, so each page now says it in words above the block.

This is a content change, not a faithful format migration, so unlike the other conversion PRs I'm not claiming an identical render.

Three real errors found while reading the sources

  1. stax, snakeyaml and jackson all documented their first reader overload with the method name missingpublic RootClass ( Reader reader, boolean strict ). It's read, as the xpp3 page shows. Same copy-paste, three pages.
  2. The StAX reader delegate was documented in package .io.xpp3. rather than .io.stax. — copied from the xpp3 page.
  3. The SAX page's only subsection was headed jackson-writer. I checked all ten pages; that one is isolated.

Dead links replaced

Not a format problem, but I wasn't going to rewrite these pages and leave them:

Was Status Now
plexus.codehaus.org/plexus-utils/ DNS gone codehaus-plexus.github.io/plexus-utils/
plexus.codehaus.org/…/Xpp3Dom.html DNS gone plexus-xml apidocs — Xpp3Dom lives there now
code.google.com/p/snakeyaml Google Code shut down bitbucket.org/snakeyaml/snakeyaml
wiki.fasterxml.com/JacksonHome gone github.com/FasterXML/jackson
dom4j.sourceforge.net/dom4j-1.6.1/ 503 dom4j.github.io
Oracle javadoc, Java 1.4.2 and 6 http Java 8, https

Each replacement checked for a 200.

Verified

All nine build. Titles and authors preserved (including the accented names). Subsection counts match the originals on every page, and so do the method signature counts:

xpp3  7/7   stax 7/7   jackson 6/6   snakeyaml 6/6
dom4j 5/5   jdom 3/3   converters 2/2   sax 4/4

xdoc has no signatures and needed no code block; its features.html link is unchanged from the original.

Supersedes part of #576

#576 says these nine pages stay as xdoc. That carve-out no longer applies — I'll update it. #576 still stands on its own for the Modello overview and the velocity page, including the image map the converter dropped.

Follows the suggestion that the method signatures in these pages are
code snippets, so the inline formatting is not needed. The xdoc used
nested markup inside a code span and <br/> with &#160; runs for
indentation, which is why a straight conversion mangled it.

As a fenced code block the same content converts cleanly and reads
better: real monospace, real indentation, and the two parenthetical
notes become comments on the methods they describe.

The variable parts were marked up as <i>my.model.package</i> and
<i>ModelName</i>; a code block cannot express that, so the sentence
above now says where those come from.

Also fixes the subsection heading, which read 'jackson-writer' on the
SAX plugin page - copied from the Jackson page. The other nine plugin
pages name their generators correctly.

Part of codehaus-plexus/.github#58
@slachiewicz slachiewicz added the documentation Documentation and site content label Aug 8, 2026
@slachiewicz
slachiewicz merged commit 9b68621 into master Aug 8, 2026
12 checks passed
@slachiewicz
slachiewicz deleted the docs/xdoc-codeblocks branch August 8, 2026 18:50
@slachiewicz slachiewicz changed the title Convert the SAX plugin page to Markdown using a code block Convert the plugin pages to Markdown using code blocks Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation and site content

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant