emacs-devel
[Top][All Lists]
Advanced

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

Re: Alternative input formats


From: Mike Gerwitz
Subject: Re: Alternative input formats
Date: Mon, 08 Dec 2014 23:24:02 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Dec 08, 2014 at 12:42:30 +0900, Stephen J. Turnbull wrote:
> How about calling the subset "InfoML, the Info-featured HTML subset"?
> It would also need to spec a CSS subset, I think (see below).

HTML is intended to be the document format, and is intended to be
semantic.[2] CSS is display-only.  Therefore, it makes sense that Emacs
would define its own (user-configurable) stylesheet, or generate one
- From faces, but HTML documents should always be able to stand on their
own.

> Other than that we need faces, and I would suggest prohibiting EM (and
> I!) and STRONG (ditto B!) elements in favor of semantic markup on DIV
> and SPAN elements ('class="nextNode"' and the like).

As was mentioned already, the whole purpose of these elements is to
provide semantics to a document; classes exist purely for styling (and
many JavaScript programs use them as metadata, though that practice is
being largely deprecated by HTML5 data attributes).

The problem with documents on the web today is that they are a mess of
output from various systems with no regard to proper structure, treating
the browser's rendering as if it were semantic.  This is wrong.

HTML5 defines a whole new set of semantic elements (that will simply not
render in older browsers, so no harm done in most cases) to address the
issue.[0]  For example, using

  <div class="article">

is useless, since `div' is ambiguous---it is used for everything!  When
a program parses the web page, what should it do?  Attempt to guess,
based on the class name(s), what data are represented by the node?

Instead, the `article' tag was introduced, along with many others, to
provide a standard document structure.[1]

  <article>
    <section>
      <h1>My Definitions</h1>
      <p>Below is a list of my definitions.</p>
      <dl>
        <dt>Some Term</dt>
        <dd>Some definition that uses <em>semantic</em> markup.</dd>
      </dl>
    </section>

    <section>
      <h1>Another Section</h1>
      <!-- ... -->
    </section>
  </article>

> And links, but Emacs already knows how to do that.

Links generally need more love; the @rel attribute aims to solve that.

[0]: 
https://developer.mozilla.org/en/docs/Web/Guide/HTML/HTML5/HTML5_element_list
[1]: 
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Sections_and_Outlines_of_an_HTML5_document
[2]: http://en.wikipedia.org/wiki/Semantic_HTML


- -- 
Mike Gerwitz
Free Software Hacker | GNU Maintainer
http://mikegerwitz.com
FSF Member #5804 | GPG Key ID: 0x8EE30EAB
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAgAGBQJUhnliAAoJEPIruBWO4w6rapcP/37r6LOpQF1jw0E0b8Ou7RW9
HDjIxW6zH0NiefboQHw00bGFreZz1R4hrhYLSKws2c7nozQH8TAT/ds3eFqGzOS3
raya2T2+BYL0eDXVdhtY4c7FWIPo1kxr5th5sXANLtcVjMsqUPoJY5MJ5Tr/2eup
sopzGyrlon5B5cMWkcGW7OR4g73o/s0WOB9UM5M5J1ato7xCiH7j7NZ3vheEEqFZ
1zBW211tksgL38iw+Wz46Sgy7VUky0277mdCYdDMhLt9suInz81BgLfETWLbeu1t
Umf0xvABCWoM6DXw5Vxh5sKcuWEva9th9YxDoYDBzgpqYs1amq3m6RcyW2AYjg1f
lrX9IVOu0hPOapg24u2ZcjkajaqVyBoHQklpv0CjsmXTiwKZRc5GRYrANA9/C7wk
sV/efuJwOd8NT1FLHOD3rBTeF56kEICHFvSCuB/791RF3QfV1tF12Gik/pi4vJ+n
CUKg1hMJgyr4f4dD26Ar2QHMp0UDG3wJfyn2nW93JsaMOmbaeVBvSiRzb/dXz7Gu
LA5zVmcN4g+ZuhnVciLA0Y17+y2ji37T6uJy9HQT4DOdDe6BaDLmNJ/v6LMfGnx9
SS/AWxPHtGZHaGyW4+KHLMP6mQw7paTV6jnUi4vSf6VtGhlCKrHdDmx8ryyNxLYM
0ysiN8haXEICvMvArcaw
=Oask
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]