Subject: adding an xml validate target
To: None <netbsd-docs@netbsd.org>
From: Jan Schaumann <jschauma@netmeister.org>
List: netbsd-docs
Date: 04/23/2006 11:52:00
--NtwzykIc2mflq5ck
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

I'd like to add a general target 'make valid' or 'make checkxml' or
something along those lines that validates the XML of a given file
without actually generating any output.

The options I've found are using tidy or xmllint.

With tidy, I can do

tidy -qe -xml <infile.xml>

However, this will not resolve entities that are included from other
files (such as man-refs.ent and developers.ent).

With xmllint, I have not yet found the right invocation, but I presume
it would be something like

xmllint --noout --valid --dtdvalid .../share/xml/website-netbsd.dtd <infile>

However, there are some problems:  no matter what I do, I always get a
warning "failed to load external entity ...", even if I pass "--nonet".

While playing around with this, I notice that the
=2E/share/xml/website-netbsd.dtd and all XML files point the DTD to
http://www.NetBSD.org/XML/htdocs/lang/share/xml/website-netbsd.dtd

This does simply not exist.  The path should be
http://www.NetBSD.org/share/xml/website-netbsd.dtd, no?

-Jan

--=20
You can blame it all on the Internet.
	Larry Wall

--NtwzykIc2mflq5ck
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (NetBSD)

iD8DBQFES6KffFtkr68iakwRAuueAKC196ZbwXFF3vXynMVoBvm2VATpDACghC6m
5PFppagZ7mYn7hlthl/W8nQ=
=Bi/G
-----END PGP SIGNATURE-----

--NtwzykIc2mflq5ck--