W3C home > Mailing lists > Public > www-html-editor@w3.org > July to September 2002

HTML 4.01 no <ins> in <pre>?

From: J. Blustein <jamie@cs.dal.ca>
Date: Wed, 10 Jul 2002 10:21:40 +0900 (JST)
Message-Id: <20020710.102140.104026748.mimasa@w3.org>
To: www-html-editor@w3.org
Cc: gerald@w3.org

   I'm not sure if I've found a mistake or just something that I don't
understand the reason for.  I am using XHTML 1.0 and referring to the
HTML 4.01 spec for guidance.  I get an error from the validator at W3C
but it sounds to me (from the spec, not the DTD) that I am correct.

   Here is what I am trying to represent in markup: I am updating an
errata list for a textbook that contains pseudocode.  Because the
formatting of the pseudocode is significant I'm using <pre> to
maintain the formatting and because I am showing insertions I'm using
<ins>.  But the validator says something is wrong

   A small but complete example is enclosed at the end of this e-mail.
Here is part of the example I'm having trouble with:

    The event part (above the line) should read:
    <pre class="code">
      rdt_rcv(rcv_pkt)<br />
      &amp;&amp; notcorrupt(rcvpkt)<br />

   The validator says:

>    Below are the results of checking this document for XML
>    well-formedness and validity.
>      Line 120, column 12: 
>                <ins>getacknum(rcvpkt)&gt;=base</ins>
>                    ^
>      Error: element "ins" not allowed here; possible cause is an
>      inline element containing a block-level element 

  When I remove the <ins> (and </ins>) then the document is reported
as valid.  But when they are present inside <pre> (and </pre>) the
document is reported as invalid.

  It seems strange to me that 

    The event part (above the line) should read:
       rdt_rcv(rcv_pkt)<br />
       &amp;&amp; notcorrupt(rcvpkt)<br />

is valid because I don't think of it as having the same semantics.
But it passes a validation check.

   Please tell me if there really is a problem with the DTD or
validator.  Otherwise I will appreciate it if you would explain to me
why <ins> is not allowed inside <pre> (or <blockquote>).

   Much obliged,
Jamie Blustein <jamie@cs.dal.ca>

 - - - 8< - - -  [enclosure begins] - - - 8< - - - 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    Misprint Corrections for Kurose &amp; Ross
 <p>[Blah blah blah]</p>
     <dt>Page 198, Figure 3.19, left-hand side</dt>
        The window should not be advanced for just any non-corrupted <abbr
        title="acknowledgment packet">ACK</abbr>.  The window should only
        advance if the <abbr>ACK</abbr> is for a packet that is in the
        current window, <abbr title="that is">i.e.</abbr> if
        <code>(acknum(rcvpkt) == base) || (acknum(rcvpkt) &gt;
        base)</code>.  If the <abbr>ACK</abbr> is for a packet with
        sequence number less than <code>base</code> then the packet should be
        The event part (above the line) should read:
        <pre class="code">
        rdt_rcv(rcv_pkt)<br />
        &amp;&amp; notcorrupt(rcvpkt)<br />
  <p>[Blah blah blah]</p>
 - - - >8 - - - [enclosure ends] - - - >8 - - - 
Received on Tuesday, 9 July 2002 21:21:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:08:47 UTC