Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Please add back `nu.validator.htmlparser.tools`

Open
#53 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
build-system, cli

Research direction

Start by inspecting test-src/nu/validator/htmlparser/tools/ and the six named entry points, then compare how the project builds its releases against the older htmlparser-1.4.jar. Restore the sample applications to the release artifact and verify that the command-line HTML/XML conversions and usage behavior described in the issue are available.

Written by the indexing model from the issue text.

Description

The original 1.4 distribution contained some example apps, that could be used from the command line. The author stated:

Sample Apps

The jar file contains sample main() entry points:

nu.validator.htmlparser.tools.XSLT4HTML5
nu.validator.htmlparser.tools.XSLT4HTML5XOM
nu.validator.htmlparser.tools.HTML2XML
nu.validator.htmlparser.tools.XML2HTML
nu.validator.htmlparser.tools.XML2XML
nu.validator.htmlparser.tools.HTML2HTML
The first two are sample apps that demo the use of XSLT with HTML5. The first one can use SAX or DOM and requires the Xalan serializer. The second one uses XOM. Running without parameters dumps usage help.

java -cp htmlparser-1.4.jar nu.validator.htmlparser.tools.XSLT4HTML5 --template=sort-ul.xsl --input-html=test.html --output-html=out.html --mode=dom

HTML2XML converts HTML5 to XML 1.0 plus Namespaces. With no arguments, it reads from stdio and writes to stdout. With one parameter, it reads the named file and writes to stdout. With two parameters, the first is the input file name and the second is the output file name.

XML2HTML, HTML2HTML and XML2XML work analogously. The *2HTML versions produce bad output if the document tree is not serializable as HTML5. It is up to the user the make sure that it is.

The sourcecode is in test-src/nu/validator/htmlparser/tools/ but none of the releases I found on Maven Central has the classes built in. I do have an older JAR, which is also named htmlparser-1.4.jar on disk, from years ago, that had these classes and thus is usable from the CLI.

May I kindly ask you, to bring these back, so one can convert HTML into XHTML simply from the command line? Thank you!

Dominant language
Java
Stars
65
Forks
29
Avg merge
11d 21h
Merged PRs (30d)
3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from validator/htmlparser

All issues in validator/htmlparser

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.