[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: On-the-fly validation of (X)HTML5 using the v.Nu REST API
From: |
Emanuel Berg |
Subject: |
Re: On-the-fly validation of (X)HTML5 using the v.Nu REST API |
Date: |
Fri, 01 Apr 2016 21:08:39 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
"Graham Hannington" <graham_hannington@fundi.com.au>
writes:
> Re:
Some unrelated formalia:
It is not necessary to put Re: before citations.
Because that is the whole idea with the angle bracket
syntax! I suspect you did it because you also used the
same syntax for *quotes*, i.e. material that didn't
appear in this thread before. There is a better way to
do that. Either just yank the quotes. Or if you want
to make them look good, indent the whole block, like
this:
Some unrelated formalia. It is not necessary to
put Re: before citations. Because that is the
idea. I suspect you did it because you also used
the same syntax for *quotes*, i.e. material that
didn't appear in this thread. There is a better
way to do that. Either just yank the quotes. Or if
you want to make them look good, indent the whole
block, like this:
I do that with a region and `C-u C-x TAB'.
With Gnus, and possibly other clients, it is possible
to hide citations (but they can be expanded):
(setq gnus-treat-hide-citation t)
It is a very practical thing especially as messages
are exchanged pretty quickly so typically you remember
what you already read.
*But*, if you interchange them and use angle brackets
for quotes, this is what happens:
http://user.it.uu.se/~embe8573/figures/gnus/gnus-hidden-quotes.png
The quotes are hidden as well!
Second, consider putting your signature under two
dashes, a space, and a newline, e.g., using C syntax
"-- \nJoe Hacker". Otherwise, again,
`gnus-article-hide-signature' and the corresponding
setting for other clients won't work.
This is described in: RFC 3676, section 4.3 [1]
> Could you please point me to the URL of a web page
> where the W3C does this?
In 2009, the W3C allowed the
XHTML 2 Working Group's charter to expire,
acknowledging that HTML5 would be the sole
next-generation HTML standard, including both XML
and non-XML serializations. Of the two
serializations, the W3C suggests that most authors
use the HTML syntax, rather than the XHTML
syntax. [2]
>> how would one benefit from on-the-fly validation?
>
> One example: validation errors are caught as you
> type them, so you don't end up with a document that
> is riddled with errors that you only find out about
> when you save.
Right, I did XML only once or twice so I don't know
how error-prone it is or how dependent the user is on
auto-completion. When I said nobody would benefit from
it, I was thinking HTML only, so I half-retract from
that statement.
I remember doing Visual Basic 5.0 as a kid. The
"GUI GUI" was, I have to give them, great, if you are
into making and using GUIs, that is. But it was
actually the opposite of MVC and it was enough to
place just a couple of buttons on the canvas to get it
all out of hand! So when you were writing code, you'd
type one letter and it'd immediately suggested several
hundred alternatives! So you'd use Hungarian notation
with the names and hopefully get it right with luck,
skill, and patience. (Or as my mother called
it: frustration.)
Perhaps using XML with thousands of objects and data
items is similar to that?
... eh :)
> This also depends on personal preference and
> particular circumstances
Yes.
> You don't have to run a validation report outside of
> the editor.
Good, but with Emacs you can run anything outside or
inside the editor, *from* the editor. (At least if you
by "inside" mean getting the result in an Emacs
buffer. With programming, you can get total
"insidness", of course.)
> How do you (by which I mean: you, Emanuel)
> validate HTML5?
This is the most advanced HTML I did validate:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
The tool I mentioned, validate(1), doesn't mention
HTML5 in its manpage, but I found this:
--xml
Indicate that the documents to be validated are
XML documents. Known document types, such as
HTML 4.01 and XHTML 1.0, are automatically
handled by "validate". For unknown document
types, "validate" will assume XHTML/XML if this
option is specified and HTML/SGML otherwise.
and this:
--[no]emacs
(don't) use an output format intended
for parsing by (X)Emacs, autodetected.
Nothing I felt the need to try, tho.
[1] http://www.ietf.org/rfc/rfc3676.txt
[2] https://en.wikipedia.org/w/index.php?title=xhtml&printable=yes
--
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
- so far: 20 Blogomatic articles -