git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC PATCH 00/12] doc: add tests and reimplement xmlto

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 13, 2023, 11:57 UTC
Message-ID
<20230413115745.116063-1-felipe.contreras@gmail.com>

It's never clear what a single change does in the myriad of {asciidoc.py,asciidoctor}{docbook45,docbook5,manpage} tools, not to mention xmlto and docbook-xsl.

So I decided to create a very simple test to generate a manpage in different tools, and the result is that nothing works correctly.

Once the test was running correctly I decided to investigate why xmlto wasn't able to verify docbook5 documents, and it turns out it's just not supported, and neither it is in xmllint.

While doing so I realized xmlto doesn't do anything for us, so I wrote a simple script that does the same thing.

Moving all the old hacks to this gen-stylesheet script, I realized a hack from 2006 is not necessary anymore, and DocBook Stylesheets already generate much better output.

Getting rid of this generates nice aligment for callouts:
     $ git diff            (1)
     $ git diff --cached   (2)
     $ git diff HEAD       (3)
  1. Changes in the working tree not yet staged for the next
     commit.
  2. Changes between the index and your last commit; what you
     would be committing if you run git commit without -a
     option.
  3. Changes in the working tree since your last commit; what
     you would be committing if you run git commit -a

There's a lot of changes not explored in detail, so this is only an RFC but I think it's clear something like this is the direction to go.

Felipe Contreras (12):
  doc: add test for doc tools output
  doc: add missing manpage docinfo
  doc: remove unnecessary hack for asciidoctor
  test: doc: add test for docbook5
  doc: fix support for multiple docbook backends
  doc: add gen-stylesheet helper
  doc: get rid of xmlto dependency
  test: doc: use temporary stylesheet
  doc: remove references to xmlto
  doc: stylesheet: move all the xslt templates
  test: doc: add check for callouts
  doc: manpage: remove callout hack
 Documentation/.gitignore               |   1 +
 Documentation/Makefile                 |  19 ++--
 Documentation/asciidoc.conf            |  15 +--
 Documentation/gen-stylesheet           |  28 +++++
 Documentation/manpage-bold-literal.xsl |  16 ---
 Documentation/manpage-normal.xsl       |  26 -----
 Documentation/manpage.xsl              |   3 -
 INSTALL                                |   4 +-
 ci/install-dependencies.sh             |   2 +-
 shared.mak                             |   3 +-
 t/t0600-doc-tools.sh                   | 135 +++++++++++++++++++++++++
 11 files changed, 184 insertions(+), 68 deletions(-)
 create mode 100755 Documentation/gen-stylesheet
 delete mode 100644 Documentation/manpage-bold-literal.xsl
 delete mode 100644 Documentation/manpage-normal.xsl
 delete mode 100644 Documentation/manpage.xsl
 create mode 100755 t/t0600-doc-tools.sh
-- 
2.40.0+fc1
Next: Felipe Contreras
Message 1 of 13 in “doc: add tests and reimplement xmlto”
  1. 00/12 doc: add tests and reimplement xmltoFelipe Contreras, Apr 13, 2023
  2. 01/12 doc: add test for doc tools outputFelipe Contreras, Apr 13, 2023
  3. 02/12 doc: add missing manpage docinfoFelipe Contreras, Apr 13, 2023
  4. 03/12 doc: remove unnecessary hack for asciidoctorFelipe Contreras, Apr 13, 2023
  5. 04/12 test: doc: add test for docbook5Felipe Contreras, Apr 13, 2023
  6. 05/12 doc: fix support for multiple docbook backendsFelipe Contreras, Apr 13, 2023
  7. 06/12 doc: add gen-stylesheet helperFelipe Contreras, Apr 13, 2023
  8. 07/12 doc: get rid of xmlto dependencyFelipe Contreras, Apr 13, 2023
  9. 08/12 test: doc: use temporary stylesheetFelipe Contreras, Apr 13, 2023
  10. 09/12 doc: remove references to xmltoFelipe Contreras, Apr 13, 2023
  11. 10/12 doc: stylesheet: move all the xslt templatesFelipe Contreras, Apr 13, 2023
  12. 11/12 test: doc: add check for calloutsFelipe Contreras, Apr 13, 2023
  13. 12/12 doc: manpage: remove callout hackFelipe Contreras, Apr 13, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.