[Phpwm] new ste

Peter Crouch pccrouch at bcs.org.uk
Wed Feb 14 23:26:20 GMT 2007

David Goodwin wrote:
>> To make the validator work all you need to do is replace your previous dtd
>> and html opening tag with (note the dtd and xml definition are the first
>> thing on the page):
>> <?xml version='1.0' encoding='UTF-8'?>
>> <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN'
>> 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
>> <html xmlns='http://www.w3.org/1999/xhtml' lang='en' xml:lang='en'>
> I've not noticed the <?xml thing all that often; is it often not used?
> Or do few people bother reaching that standard?
> (<? also has that annoying property of being the equivalent of <?php on
> some stupid servers, and is quite annoying when you find it in 3rd party
> code).
> David.
In my limited experience with XHTML I have not used the initial <?xml 
.... ?> line and my pages have validated successfully as XHTML 1.0 
Transitional with the W3C validator, the WDG validator and the Total 

The W3C XHTML1.0 standard, at http://www.w3.org/TR/xhtml1/, says "An XML 
declaration is not required in all XML documents; however XHTML document 
authors are strongly encouraged to use XML declarations in all their 
documents. Such a declaration is required when the character encoding of 
the document is other than the default UTF-8 or UTF-16 and no encoding 
was determined by a higher-level protocol."

So that probably explains why we can get away with omitting the <?xml 
... ?> stuff even though we should include it!

Best wishes,

Peter Crouch
Tel: 0121 523 6756
E-mail: pccrouch at bcs.org.uk

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

More information about the Phpwm mailing list