Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#53 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java
Lĩnh vực
build-system, cli

Hướng nghiên cứu

Bắt đầu bằng cách kiểm tra test-src/nu/validator/htmlparser/tools/ và sáu điểm vào được nêu tên, sau đó so sánh cách dự án xây dựng các bản release của mình với htmlparser-1.4.jar cũ. Khôi phục các ứng dụng mẫu vào artifact của release và xác minh rằng các chuyển đổi HTML/XML bằng dòng lệnh và hành vi sử dụng được mô tả trong issue đều khả dụng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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!

Ngôn ngữ chính
Java
Star
65
Fork
30
Merge trung bình
11 giờ 33 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của validator/htmlparser

Tất cả issue của validator/htmlparser

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.