spdx / spdx/LicenseListPublisher

XHTML declaring itself text/html

Open
#16 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

wontfix
Dominant language
Java
Stars
23
Forks
29
Avg merge
6h 31m
Merged PRs (30d)
2

Description

Submitted by @wking and moved from https://github.com/spdx/tools/issues/123

Spun off from here. We're serving the license pages as HTML:

$ curl -sI https://spdx.org/licenses/preview/ISC.html | grep Content-Type
Content-Type: text/html; charset=UTF-8
and doubling down on that with a meta http-equiv in the template (and a few sibling templates under htmlTemplate. This conflicts with the W3C recommendation that XHTML served as text/html not contain XML declarations (which our templates do). I see two potential solutions:

a. Serve our XHTML as application/xhtml+xml. This works for clients that ask for XHTML, but the W3C recommends only serving it to clients who “explicitly indicate they support this media type”, so we'd need HTML versions to serve to everyone else.
b. Drop XHTML and just serve vanilla HTML5.

(a) is a superset of (b), since we'll need a vanilla HTML option to comply with the W3C recommendations for clients who don't explicitly indicate they support XHTML. The question is whether we want to continue to support XHTML in parallel or not. With XML data already available from license-list-XML, I don't see a point to continuing to maintain XHTML output. If that seems like a reasonable position, I can start filing PRs to transition the templates to HTML5.

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.

Research direction

Start with the templates under htmlTemplate and inspect the generated license page headers and meta declarations. Resolve whether the project will retain XHTML alongside HTML5, then update the affected templates and verify the Content-Type behavior with the curl check shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, xml
Domain
web-dev
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.