[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
http://www.flora.org/lynx-dev/html/month0599/msg00024.html
From: |
ke |
Subject: |
http://www.flora.org/lynx-dev/html/month0599/msg00024.html |
Date: |
Sun, 2 May 1999 08:12:14 +0200 |
> * To: address@hidden
> * Subject: Re: lynx-dev <p>...</p><pre>...</pre>
> * From: Chuck Martin <address@hidden>
> * Date: Sat, 1 May 1999 22:01:34 -0400
> * In-Reply-To: <address@hidden>; from Karl
> Eichwalder on Sat, May 01, 1999 at 10:12:12PM +0200
> * Mail-Followup-To: address@hidden
> * References: <address@hidden>
> * Reply-To: address@hidden
> * Sender: address@hidden
>On Sat, May 01, 1999 at 10:12:12PM +0200, Karl Eichwalder wrote:
>>
>> If you don't close the first paragraph, it's even impossible to force
>> lynx to display the needed blank line. Please note, that every PRE
>> element closes the previous block element (have a look at the HTML DTD).
>
>Are you sure about that?
Yes ;)
Simply run and validating parser on the HTML code:
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>
The parser will add the missing end elements (I remove the attribute
lines for clarity via `sed'):
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
>| 9.3.4 Preformatted text: The PRE element
>|
>| <!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?
This says nothing, where PRE might appear. Have a look at the
definition of P:
<!ELEMENT P - O (%inline;)* -- paragraph -->
As you see, P may only contain inline element; as soon as an block
element occurs, the P will be closed implicitly. Therefore it's also
not possible to have lists inside of Ps.
>And doesn't that mean that you should be able to include it in the
>middle of a block of text without it starting a new line?
If you don't want to start a new line, you've to use an inline element
(e.g., CODE).
--
Karl Eichwalder
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- http://www.flora.org/lynx-dev/html/month0599/msg00024.html,
ke <=