[Top][All Lists]

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

Re: lynx-dev Re: making Web pages universally usable: 10 steps to

From: Nelson H. F. Beebe
Subject: Re: lynx-dev Re: making Web pages universally usable: 10 steps to success
Date: Mon, 6 May 2002 16:54:10 -0600 (MDT)

address@hidden asks on Mon, 6 May 2002 16:33:18 -0600 (MDT)
about my posting on the omission of space after opening tags, and
before closing tags:

>> Do they perhaps mean "or" rather than "and" here?

No: space following the open tag is to be omitted, and also space
preceding the closing tag is to be omitted.  That allows them, for
example, to be written on separate lines, as in

    <A HREF="...">
          this will be hyperlinked
          and this will be boldface

I should have mentioned that verbatim-like environments, such as
<PRE>..</PRE>, and the old obsolete <PLAINTEXT> tag, are exempt from
the spacing rule: all space inside the PRE environment is significant,
and browsers are supposed to render it in a fixed-width font, so as to
preserve vertical alignment of characters.

It is regrettable that, while SGML is a grammatically rigorous markup
system, its grammars are extremely difficult for humans to parse
mentally.  Part of this difficulty arises from their generality:
unlike most programming language grammars, which attach fixed meaning
to each character, SGML grammars allow changing character meaning
on-the-fly.  Thus, you can, for example, define an SGML grammar in
which commands look like \xxx ... \endxxx instead of <xxx>...</xxx>.

HTML and XML, two particular instances of SGML markup, eliminate this
generality, in order to make it possible to write parsers using
standard LALR(1) tools like lex/yacc, flex/bison, LEX/occs, ...:
indeed, a design goal of XML was to make it possible to construct a
rudimentary parser for XML in an afternoon using just pattern matching
in a language like awk or perl.

- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- Center for Scientific Computing       FAX: +1 801 585 1640, +1 801 581 4148 -
- University of Utah                    Internet e-mail: address@hidden  -
- Department of Mathematics, 110 LCB        address@hidden  address@hidden -
- 155 S 1400 E RM 233                       address@hidden                    -
- Salt Lake City, UT 84112-0090, USA    URL:  -

; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

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