Re: validation and asp / asp.net

On Sat, 8 Jan 2005 craighemus@mobile-mail.co.uk wrote:

> as soon as i added the asp code the site will no longer validate.  I can accept
> this in the offline code but if the template was valid then the returned HTML
> code from the asp processes should also be valid.

By "template" you mean some code that gets converted to HTML by some
software, right? Then there's no such thing as validity or invalidity for
the template, unless it is describable in SGML or XML and you have defined
a DTD for it. So there's no "should also be valid". Validity is a property
of the generated HTML document only.

> the problem is that this is not the case because the asp returns unusual
> characters in the generated HTML (e.g.  ...method="post" action="news.aspx"
> id="_ctl0">).

The character "_" is not unusual. It is simply not allowed as the first
character of an ID value, and the id attribute is declared as being of
type ID. Do whatever needs to be done to make the id attribute value
conform to the required pattern, which is described in prose at
http://www.w3.org/TR/html4/types.html#type-id
(The key issue is that it must begin with a letter.)

> I was wondering if there is going to be a way around this in the near future or

Around what? I'm pretty sure you can fix the error, but if you need help
with it, try asking on a forum devoted to using ASP, and explain in
sufficient detail the ASP code you are using.

> even if i could still put the W3C Validation logo at the bottom of my
> pages as i have put the effort into making sure the code that i write
> is compliant?

The real meaning of the validation logo is just showing off, often
even falsely; for a more detailed explanation, see
http://www.cs.tut.fi/~jkorpela/html/validation.html#icon
But technically, what you are asking is "can I claim to conform to some
rules when I don't actually conform, if only I think I've tried hard"?

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

Received on Wednesday, 12 January 2005 06:45:07 UTC