Skip to content

Convert the FAQ from FML to Markdown - #1009

Merged
slachiewicz merged 2 commits into
masterfrom
faq-to-markdown
Aug 10, 2026
Merged

Convert the FAQ from FML to Markdown#1009
slachiewicz merged 2 commits into
masterfrom
faq-to-markdown

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

Converts this project's FAQ from FML to Markdown, continuing the estate-wide
move off the Doxia FML format.

maven-enforcer-plugin/src/site/fml/faq.fml becomes maven-enforcer-plugin/src/site/markdown/faq.md, in two commits:

  1. a pure git mv, no content change, so git log --follow keeps working;
  2. the hand-written rewrite.

Please merge or rebase rather than squash, so the rename commit survives.

Why by hand rather than with doxia-converter

FML is a FAQ-specific Doxia format (<faqs> / <part> / <faq id=…>) with no
Markdown counterpart, and doxia-converter cannot target it: the questions come
out as link-reference syntax rather than headings, the [top] back-links turn
into links to a nonexistent top page, and the contents links lose their #
anchors. The page is written out by hand.

Every published URL still resolves

This page has been on maven.apache.org for years and is deep-linked from blog
posts and Stack Overflow, so no fragment may change.

FML routes every <faq id> through DoxiaUtils.encodeId, which rewrites any id
that is not a valid XML name — a space becomes _, and any other character
becomes its dot-prefixed UTF-8 bytes, so , becomes .2C and ? becomes
.3F. The <a name> elements added here reproduce that rendered anchor,
not the raw id= attribute, which for several entries is not the same string.

Verified by generating the site before and after the change and comparing the
set of anchors the generated faq.html actually serves — id= on any element
plus name= on any <a>. The requirement is that the before-set is a subset of
the after-set:

before: 3 anchors
after:  5 anchors
missing: none

The anchors carried over are:

bodyColumn
question
top

The <head> is byte-identical, so the page title and metadata are unchanged.
site.xml needs no edit — both source paths render to faq.html.

Accepted rendering losses

  • FML emits a [top] back-link after every answer; those are dropped rather
    than hand-written.
  • Each question renders as an h3 heading rather than a definition term, so
    the answers are no longer wrapped in a <dl>.

Generated-by: Claude Opus 5 (1M context)

Git records a rename plus a rewrite in one commit as a delete and an
add, which stops 'git log --follow'. Splitting the rename out keeps the
history. Please merge or rebase rather than squash.

Generated-by: Claude Opus 5 (1M context)
doxia-converter cannot target FML usefully - the questions come out as
link-reference syntax rather than headings, the [top] back-links become
links to a nonexistent 'top' page, and the contents links lose their #
anchors. The page is written out by hand instead.

Explicit anchors keep the existing deep links working. FML routes every
<faq id> through DoxiaUtils.encodeId, which rewrites an id that is not a
valid XML name: a space becomes '_' and any other character becomes its
dot-prefixed UTF-8 bytes, so ',' becomes .2C and '?' becomes .3F. The
<a name> elements emitted here reproduce that rendered form, not the raw
attribute, so the live URLs still resolve.

Prose double quotes are written as &quot; entities: flexmark's smart
punctuation would otherwise turn a straight quote into a typographic
one and silently change the visible text. That matches the convention
already used by the Markdown pages in this estate.

Verified by building the site before and after and comparing the set of
anchors the generated faq.html actually serves. All 3 anchors present
before are still present after (5 after, the extra ones being the ids
Doxia derives from the new headings):

  bodyColumn
  question
  top

The <head> is byte-identical, so the title and metadata are unchanged.
site.xml needs no edit - maven-enforcer-plugin/src/site/fml/faq.fml and
maven-enforcer-plugin/src/site/markdown/faq.md both render to faq.html.

FML generates a [top] back-link after each answer; those are dropped
rather than hand-written. The question renders as an h3 heading rather
than a definition term. Those are the only rendering losses.

Generated-by: Claude Opus 5 (1M context)
@slachiewicz slachiewicz added the documentation Improvements or additions to documentation label Aug 10, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review August 10, 2026 00:26
@slachiewicz
slachiewicz merged commit 23e21f9 into master Aug 10, 2026
20 of 21 checks passed
@slachiewicz
slachiewicz deleted the faq-to-markdown branch August 10, 2026 00:26
@github-actions github-actions Bot added this to the 3.6.4 milestone Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant