Randy Webb <hikksnotathome@aol.com> wrote:
[color=blue]
>In trying to validate a document as XHTML Strict, and using < and
>> to display < and >, I get this message from the validator:
>
>character "&" is the first character of a delimiter but occurred as data[/color]
Are yiu sure you're getting that message in relation to > or <?
They both validate under XHTML 1.0 Strict.
[color=blue]
>1) What exactly does that mean?[/color]
The code contains an & that is not the start of a recognised entity.
[color=blue]
>2) How can I display < and > without using < and > and not get the
>messages from the validator?[/color]
< > < > < >
[color=blue]
>The lines are lines of script code that look something like this:
>
>this.ie4=(document.all && !this.dom && !this.opera5)?1:0;<br />
>
>And its the && that is causing the problems. :-([/color]
So nothing to do with > or < after all?
Move the JavaScript to an external .
js file. XHTML has different rules
on embedding scripts and whilst in theory you can mark the script
content as CDATA it's usually easier to just put it all in an external
file.
Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor
Steve Pugh <steve@pugh.net> <http://steve.pugh.net/>