Creating HTML document question
Fairlight
fairlite at fairlite.com
Tue Feb 20 16:00:16 PST 2007
Simon--er, no...it was Bill Campbell--said:
>
> Because HTML, like xml, pretty much ignores multiple spaces
> unless one is in a <pre>...</pre> block.
That's not actually true, though. The data -inside- an XML element is
taken literally. Whitespace outside the elements is basically ignored,
except newlines are preserved--even if not rendered by anything (ie., a
browser).
In HTML, whitespace outside tags is ignored unless it's a newline, which
would be preserved. Whitespace inside an element is preserved, but the
-rendering- specs say that it condenses in the form "s/\s+/ /g"
(shorthand...Bill will know what I mean).
In either event, the whitespace is actually preserved. There just aren't
rendering specs for XML data unless you get into XSLT or the like. But the
data -is- sacrosanct. I've put in lots of whitespace in plain XML and it
comes back faithfully in both IE and Firefox's default XML stylesheets. It
uses proportional fonts, but it's preserved.
mark->
--
Try our new SPF-0 lotion, SunScream[tm]. Get it while it's hot!
More information about the Filepro-list
mailing list