Re: [xml] xmllint DTD troubles



Lars Skjærlund schrieb am 06.06.2012 um 16:03 (+0200):

We're trying to validate XHTML documents using the following syntax:

xmllint --noout --dtdvalid /etc/xml/xhtml/xhtml1-transitional.dtd <filename>

This works - kind of: If I omit the path to the DTD, xmllint complains
that it cannot find the DTD.

The --dtdvalid switch is meant to be used with a filename argument.
If you don't need that because you're relying on the DOCTYPE of the
document, then use the --valid switch. (But maybe I got you wrong.)

$ xmllint | grep valid
  --valid : validate the document in addition to std well-formed check
  --dtdvalid URL : do a posteriori validation against a given DTD

xmllint does not, however, load the external references in the
standard DTD: For the standard W3C, you have three external files
defining various entities such as &nbsp;.

What is the "standard DTD" and which files or URLs does xmllint fail to
load?

I've tried searching the net for hours to find a solution, but this
one beats me: How can I make xmllint work using the standard W3C DTDs?

If by "standard W3C DTDs" you mean the ones from the W3C servers:
That won't work, they're usually blocked.

Michael



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]