Thanks for the discussion folks...
Actually, because I can't really find a way to get by on the word-wrap
issue and also the use of indents (as they appear in the code) I've
done all of this in php without code or pre. It uses 's for the
tabs (preg_replace("/\t/"...). Aside from creating a few more regex
rules to deal with inputting slashes and the like, it seems to work
well enough.
What I'm doing is meant purely for presentation...it's a fast way for a
person to view a script and try to determine where a bug might live
(via the line number).
If you are curious this is what an output looks like (I'm not sure if
the 's will encode when I send this email). If there is time I
might add some simple syntax highlighting rules to the script...
<strong>1</strong> <?php<br />
<strong>2</strong> <br />
<strong>3</strong> function
rowNumber($i)<br />
<strong>4</strong> {<br />
<strong>5</strong>
if ($i < 10) {<br />
<strong>6</strong>
return
"<strong>$i</strong>&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;";<br />
<strong>7</strong>
} elseif (($i >= 10) && ($i <= 999)) {<br />
<strong>8</strong>
return
"<strong>$i</strong>&nbsp;&nbsp;&nbsp;
&nbsp;";<br />
<strong>9</strong>
} else {<br />
<strong>10</strong>
return
"<strong>$i</strong>&nbsp;&nbsp;&nbsp;
";<br />
<strong>11</strong> }<br
/>
<strong>12</strong> }<br />
<strong>13</strong> <br
/>
<strong>14</strong> ?><br />
On May 31, 2005, at 2:43 PM, Patrick Lauke wrote:
designer
Surely, the fact that <pre> denotes 'preformatting' means that the
formatting has occurred 'somewhere else' and not in the body
of the html.
So, in that sense, in what way is <pre> 'presentational' any
more than all
CSS is 'presentational?
Aeh...I'm not quite following your reasoning here. But to pick up
just on the last bit: CSS is *meant* for presentation, while HTML
should only mark up *content*. That's where I see the problem:
<pre> denotes how something looks, rather than what it is (which
is the whole idea of "semantic" markup).
To take a simple example, if I set
CSS rules in
defining <H1> characteristics, is using that <h1> tag in the
html 'purely
presentational' or is it different to <pre>?
You'd use <h1> only if the text you're marking up is an actual
heading (unless you use <h1> to mark up "oh, i want that text nice
and big", in which case you're abusing <h1> for presentational
purposes).
But to reiterate: <h1> has semantic connotations - the content it
marks up is a heading. <pre>, on the other hand, does not provide
any indication of what's inside, only how it's displayed.
Sometimes, <pre> strikes me just like a css declaration,
except that you
don't have to declare what the formatting is in the header :-)
And that's a bad thing; we want separation of content and presentation.
Patrick
________________________________
Patrick H. Lauke
Webmaster / University of Salford
http://www.salford.ac.uk
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************