0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

The Nu Html Checker をローカルで使ってみた

Posted at

The Nu Html Checkerとは

The Nu Html Checkerは、W3CWhatWGでも利用されているHTMLのバリデーターです。上記W3CまたはWhatWGのページにアクセスして、チェック対象のページのURLを入力して、HTMLの仕様に準拠しているかどうかをチェックするというのが一般的な使い方となる。

しかし、この方法には以下の問題があります:

開発中のページのように社外からアクセスできないページや、ログインが必要なページのチェックができない

公開前のページなど、社外に出せないページのチェックに向いていない

以下の方法で、これらの問題に対応できる

以下の方法で、手元の開発環境や社内ネットワーク上にThe Nu Html Checkerの実行環境を構築することができます

準備

  1. 公式からDL

  2. 1を以下コマンドで解凍

$ unzip vnu.jar_16.1.1.zip

展開されたのファイル確認

dist/ 配下を確認
image.png

dist/index.html マニュアルとなっている

コマンドを実行

$ java -Xss512k -cp dist/vnu.jar nu.validator.servlet.Main  8099
2021-07-22 20:02:26.795:INFO::main: Logging initialized @304ms
nu.validator.servlet.VerifierServletTransaction - Starting static initializer.
nu.validator.servlet.VerifierServletTransaction - Reading miscellaneous properties.
nu.validator.servlet.VerifierServletTransaction - Starting to loop over config file lines.
nu.validator.servlet.VerifierServletTransaction - Finished reading config.
nu.validator.servlet.VerifierServletTransaction - Converted config to arrays.
nu.validator.servlet.VerifierServletTransaction - Prepared namespace array.
nu.validator.servlet.VerifierServletTransaction - Parsed doctype numbers into ints.
nu.validator.servlet.VerifierServletTransaction - The cache path prefix is: null
nu.validator.servlet.VerifierServletTransaction - Parsing set up. Starting to read schemas.
nu.validator.servlet.VerifierServletTransaction - Will load schema: http://s.validator.nu/html5.rnc
nu.validator.servlet.VerifierServletTransaction - Will load schema: http://s.validator.nu/html5-its.rnc
nu.validator.servlet.VerifierServletTransaction - Will load schema: http://s.validator.nu/html5-rdfalite.rnc
nu.validator.servlet.VerifierServletTransaction - Will load schema: http://s.validator.nu/xhtml10/xhtml-strict.rnc
nu.validator.servlet.VerifierServletTransaction - Will load schema: http://s.validator.nu/xhtml10/xhtml-transitional.rnc
nu.validator.servlet.VerifierServletTransaction - Will load schema: http://s.validator.nu/xhtml10/xhtml-frameset.rnc
nu.validator.servlet.VerifierServletTransaction - Will load schema: http://s.validator.nu/xhtml5.rnc
nu.validator.servlet.VerifierServletTransaction - Will load schema: http://s.validator.nu/xhtml5-rdfalite.rnc
nu.validator.servlet.VerifierServletTransaction - Will load schema: http://s.validator.nu/xhtml1-ruby-rdf-svg-mathml.rnc
nu.validator.servlet.VerifierServletTransaction - Will load schema: http://s.validator.nu/svg-xhtml5-rdf-mathml.rnc
nu.validator.servlet.VerifierServletTransaction - Schemas read.
nu.validator.servlet.VerifierServletTransaction - Reading spec.
nu.validator.servlet.VerifierServletTransaction - Spec read.
nu.validator.servlet.VerifierServletTransaction - Initialization complete.
2021-07-22 20:02:32.134:INFO:oejs.Server:main: jetty-9.2.z-SNAPSHOT
2021-07-22 20:02:32.171:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@f32f46{/,null,AVAILABLE}
2021-07-22 20:02:32.198:INFO:oejs.ServerConnector:main: Started ServerConnector@13edb3b{HTTP/1.1}{0.0.0.0:8099}
2021-07-22 20:02:32.199:INFO:oejs.Server:main: Started @5712ms

http://localhost:8099/ アクセス

image.png

実際にファイル選択 からhtmlファイルを指定してチェッカー実施

image.png

下までスクロールで確認し、HTML5のチェッカーに通るようにファイルを修正する

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?