[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev <p>...</p><pre>...</pre>
From: |
Karl Eichwalder |
Subject: |
lynx-dev <p>...</p><pre>...</pre> |
Date: |
02 May 1999 08:30:35 +0200 |
| | <!ENTITY % pre.exclusion "IMG|OBJECT|BIG|SMALL|SUB|SUP">
| |
| | <!ELEMENT PRE - - (%inline;)* -(%pre.exclusion;) -- preformatted text -->
| | <!ATTLIST PRE
| | %attrs; -- %coreattrs, %i18n, %events --
| | >
| Doesn't that "%inline;" mean that <PRE> is supposed to be inline
| text?
No, not at all. It's a block element:
<!ENTITY % preformatted "PRE">
<!ENTITY % block
"P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |
BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">
Use a validating parser (nsgmls) and you'll see want's going on; omitted
element will be added:
address@hidden:/var/tmp > cat ppp.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<title>P - PRE - P</title>
</head>
<body>
<p>
text 1
<pre>
preformatted text
</pre>
<p>
text 2
</body>
</html>
address@hidden:/var/tmp > nsgmls ppp.html | sed -e '/^A/d'
(HTML
(HEAD
(TITLE
-P - PRE - P
)TITLE
)HEAD
(BODY
(P
-text 1\n
)P
(PRE
-preformatted text
)PRE
(P
-text 2\n\n
)P
)BODY
)HTML
C
--
Karl Eichwalder