all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Allan Gottlieb <gottlieb@nyu.edu>
To: help-gnu-emacs@gnu.org
Subject: Re: sgml-validate
Date: Sun, 13 Feb 2011 10:29:08 -0500	[thread overview]
Message-ID: <yu9lj1kuf5n.fsf@nyu.edu> (raw)
In-Reply-To: <i7aai0sr7o.fsf@hilbert.math.albany.edu> (William F. Hammond's message of "Sat, 12 Feb 2011 19:39:23 -0500")

On Sat, Feb 12 2011, William F. Hammond wrote:

>>> When I tried M-x sgml-validate, it offers to run
>>> nsgmls -s myfile.html
>>>
>>> I don't have nsgmls so looked around and found
>>> opensp providing onsgmls and a gentoo bug report claimed
>>> a symlink nsgmls -->  onsgmls.
>>>
>>> Emerged opensp and now have onsgmls.
>>>
>>> But onsgmls -s myfile.html
>>> just hangs and uses no CPU time.
>>>
>>> onsgmls claims it will validate "the SGML document whose document entity is
>>> specified by the system identifiers SYSID..." so perhaps my error is in
>>> supplying just a file name.  What is needed for a valid SYSID?
>
>> AFAIU that's rather an sgml-issue.
>>
>> Seems the command onsgmls fails, which should happen too for the very
>> reasons also from the command line outside Emacs.
>>
>> BTW I use `xmllint' for validation, may be it's ok for your purposes too.
>
> onsgmls is a very reliable tool.  In general, however, it requires
> complicated command lines.

Agreed.  I have given up since I was not able to figure out how to have
it "not validate" and xmllint has that ability.  The validation adds
minutes to the test so needs to be used sparingly.

> AIUI "xmllint" works only on xml files, and, therefore, probably won't
> work with most extant html files, even those self-identified as
> the xml form of html, which commonly are not "well-formed xml".
> (Xml well-formedness is easily and quickly checked using James Clark's
> "xmlwf" that is included with "expat" distributions.)

Thank you very much for this tip.  I ran xmlwf and my html passed!  This
was made possible in large part by sgml-xml-mode.  I believe xmllint
also validates, but xmlwf has the plus of speed and not commenting about
entities (see below).

> If your html is dependably well-formed xml, then take your questions
> to comp.text.xml.  Otherwise maybe take them to
> comp.infosystems.www.authoring.html unless you really, really want a
> full understanding of the sgml background for html in which case ask
> in the rather quiet group comp.text.sgml.

Actually I am now doing OK thanks to the help I received here.
The only annoyance is that xmllint keeps telling me that
&ge; et al are not valid entities.

> Furthermore, be aware that the proposal for future html5 served as
> "text/html" falls outside of all classical sgml/xml validation
> paradigms.

Thanks for the warning.

allan



  reply	other threads:[~2011-02-13 15:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-05  3:48 sgml-validate Allan Gottlieb
2011-02-05 13:02 ` sgml-validate Andreas Röhler
     [not found] ` <mailman.6.1296910957.7938.help-gnu-emacs@gnu.org>
2011-02-13  0:39   ` sgml-validate William F Hammond
2011-02-13 15:29     ` Allan Gottlieb [this message]
     [not found]     ` <mailman.10.1297610953.15503.help-gnu-emacs@gnu.org>
2011-02-17  0:56       ` sgml-validate William F Hammond
2011-02-17  4:21         ` sgml-validate Allan Gottlieb
2011-02-20 17:25           ` sgml-validate Yuri Khan
2011-02-22 14:44             ` sgml-validate Allan Gottlieb
2011-02-22 20:03               ` sgml-validate Yuri Khan
2011-02-23 14:34                 ` sgml-validate Allan Gottlieb
     [not found]         ` <mailman.6.1297916501.11971.help-gnu-emacs@gnu.org>
2011-02-19  0:25           ` sgml-validate William F Hammond
2011-02-20 13:19             ` sgml-validate Allan Gottlieb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yu9lj1kuf5n.fsf@nyu.edu \
    --to=gottlieb@nyu.edu \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.