Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-07-2006, 12:05 PM   PM User | #1
langer
New to the CF scene

 
Join Date: Jan 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
langer is an unknown quantity at this point
Bobby compliant

Currently to make our pages "Bobby Compliant" we have the line <?xml version="1.0" encoding="iso-8859-1"?>
This was a requirement given by our development team.

However I have been told that this causes problems. e.g. IE goes into "quirks mode"

Question is:

What exactly is the problem with IE going into quirks mode ?
What other problems does the <xml... syntax cause ?
How can I get my pages Bobby Compliant without the <xml... syntax ? I have noticed that CAST (the disabilities organisation (http://cast.org)) doesn't have the xml tag.

Any help appreciated

Cheers
langer is offline   Reply With Quote
Old 03-07-2006, 12:32 PM   PM User | #2
gsnedders
Senior Coder

 
gsnedders's Avatar
 
Join Date: Jan 2004
Posts: 2,340
Thanks: 1
Thanked 7 Times in 7 Posts
gsnedders will become famous soon enough
IE uses it's own (incorrect) box model in quirks mode.
None.
From what I can tell, as long as it's well-formed XML, it should be fine.
__________________
Geoffrey Sneddon
gsnedders is offline   Reply With Quote
Old 03-07-2006, 12:49 PM   PM User | #3
ronaldb66
Senior Coder

 
Join Date: Jun 2002
Location: The Netherlands, Baarn, Ut.
Posts: 4,253
Thanks: 0
Thanked 0 Times in 0 Posts
ronaldb66 is an unknown quantity at this point
xml, accessibility

I can't see why the xml prolog would affect accessibility in any way; what doctype do these pages have?
__________________
Regards,
Ronald.
ronaldvanderwijden.com
ronaldb66 is offline   Reply With Quote
Old 03-07-2006, 01:19 PM   PM User | #4
langer
New to the CF scene

 
Join Date: Jan 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
langer is an unknown quantity at this point
Hi

Thanks for the replies.

The pages are HTML not XML and have the following Doc type

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>

Cheers
langer is offline   Reply With Quote
Old 03-07-2006, 01:34 PM   PM User | #5
gsnedders
Senior Coder

 
gsnedders's Avatar
 
Join Date: Jan 2004
Posts: 2,340
Thanks: 1
Thanked 7 Times in 7 Posts
gsnedders will become famous soon enough
XHTML is a subset of XML.
__________________
Geoffrey Sneddon
gsnedders is offline   Reply With Quote
Old 03-07-2006, 01:41 PM   PM User | #6
Masterslave
Regular Coder

 
Masterslave's Avatar
 
Join Date: Dec 2005
Posts: 287
Thanks: 2
Thanked 0 Times in 0 Posts
Masterslave is an unknown quantity at this point
Maybe this is correct to prevent quirks mode in IE:
PHP Code:
$xml " &lt;?xml version='1.0' encoding='iso-8859-1'&gt;"
echo $xml
Is this the way to prevent quirks mode, because the first output is the doctype a the xhtml document.
Correct me if I'm wrong...
__________________
Do you Ubuntu?
Mozilla Firefox!
Masterslave is offline   Reply With Quote
Old 03-07-2006, 01:55 PM   PM User | #7
langer
New to the CF scene

 
Join Date: Jan 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
langer is an unknown quantity at this point
Once again thanks for the responses. However the conversation has become a little complicated for me.

Whenever I submit something to the forum, the first thing people advise is to get rid of the <xml... line because it sends IE into quirks mode.

However our development team insist that the <xml... line stays as it is required for bobby compliance

How can I have both? A page which is BC but doesnt throw IE into quirks mode?

Error 404: You say XHTML is a subset of XML. This one is beyond me. Could you explain a little more. How does this affect my situation?

Cheers
langer is offline   Reply With Quote
Old 03-07-2006, 02:21 PM   PM User | #8
ronaldb66
Senior Coder

 
Join Date: Jun 2002
Location: The Netherlands, Baarn, Ut.
Posts: 4,253
Thanks: 0
Thanked 0 Times in 0 Posts
ronaldb66 is an unknown quantity at this point
Why?

Quote:
it is required for bobby compliance
Why? What influence does the xml prolog have on accessibility? Ask them if they even serve these pages as application/xhtml+xml--which they probably are not, in which case the xml prolog is only a nuisance and a HTML 4.01 doctype would be just as appropriate.

By the way: Bobby approval is not the holy grail in accessibility checking, merely an indication; no automated process can cover everything. User testing and just common sense are more important.
__________________
Regards,
Ronald.
ronaldvanderwijden.com
ronaldb66 is offline   Reply With Quote
Old 03-07-2006, 02:31 PM   PM User | #9
brothercake
Senior Coder


 
Join Date: Jun 2002
Location: near Oswestry
Posts: 4,508
Thanks: 0
Thanked 0 Times in 0 Posts
brothercake is an unknown quantity at this point
Quote:
Originally Posted by langer
However our development team insist that the <xml... line stays as it is required for bobby compliance
Simple - your team is wrong - the XML prolog has nothing to do with accessibilty at all. Even putting it aside and looking only at academic validation, the prolog is still optional.

Quote:
Originally Posted by ronaldb66
By the way: Bobby approval is not the holy grail in accessibility checking, merely an indication; no automated process can cover everything. User testing and just common sense are more important.
Amen, in fact I'll go further - Bobby is the anti-christ of accessibility testing. Automated testing is little more than a memory refresher - to remind you of things you might have missed - it cannot actually assess accessibility; but even for that, Bobby is the worst validator out there. Cynthia Says is far more useful - http://www.contentquality.com/

But ultimately, if you're serious about accessibility there's no substitute for manual auditing - go through the guidelines manually, and ask yourself if you meet each one.
__________________
"Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark
brothercake is offline   Reply With Quote
Old 03-07-2006, 03:44 PM   PM User | #10
langer
New to the CF scene

 
Join Date: Jan 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
langer is an unknown quantity at this point
Thank for all the advice. I may come back to this post as and when I have additional questions.
langer is offline   Reply With Quote
Old 03-07-2006, 04:17 PM   PM User | #11
slushy77
New Coder

 
Join Date: Jan 2006
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
slushy77 is an unknown quantity at this point
the only problem i've had with <?xml ...?> is that it can interfere with php, but thats beyond the scope of this topic. If IE goes into quirks mode because of it(doubtful), it doesn't matter, all it means is that html will be rendered as html 4.0.1 instead of xhtml.

however if you use the following, most browsers will know what to do
Code:
<!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">
We have to remember who we design webpages for (I dont recall a machine signing my contracts)
A good testing methodology is to get a sample group of users to review websites before they go live.
__________________
live every day as if it was your first
slushy77 is offline   Reply With Quote
Old 03-07-2006, 04:34 PM   PM User | #12
Bill Posters
Senior Coder

 
Join Date: Feb 2003
Posts: 1,665
Thanks: 0
Thanked 27 Times in 25 Posts
Bill Posters will become famous soon enough
Quote:
Originally Posted by slushy77
the only problem i've had with <?xml ...?> is that it can interfere with php, but thats beyond the scope of this topic.
I'd be interested in hearing more about it.

Quote:
If IE goes into quirks mode because of it(doubtful), it doesn't matter, all it means is that html will be rendered as html 4.0.1 instead of xhtml.
I'm not quite sure that I agree with your description, but I'd say that whether or not IE is in quirks or compliant mode does matter. (Incidentally, it's not doubtful, but a matter of record that IE6/Win goes into quirks when anything comes before the DTD.)

If a layout has been designed to work in IE/Win when in compliant mode, it's likely to go tits up to some extent if quirks mode is triggered.
Boxes are likely to expand, potentially throwing divs completely out of place, thereby breaking the layout considerably - and no-one wants to be serving up a badly broken layout to users of the most widely used browser available.


For my money, 'content negotiation' is the answer.

Last edited by Bill Posters; 03-07-2006 at 04:37 PM..
Bill Posters is offline   Reply With Quote
Old 03-07-2006, 04:53 PM   PM User | #13
gsnedders
Senior Coder

 
gsnedders's Avatar
 
Join Date: Jan 2004
Posts: 2,340
Thanks: 1
Thanked 7 Times in 7 Posts
gsnedders will become famous soon enough
Quote:
Originally Posted by Bill Posters
I'd be interested in hearing more about it.
PHP has short tags, which are enabled by default, which makes <? a valid starting tag for PHP. PHP therefore tries to parse the XML prologue which results in errors. The best solution is just to use:
PHP Code:
<?php echo '<?xml version="1.0" encoding="iso-8859-1"?>'?>
__________________
Geoffrey Sneddon
gsnedders is offline   Reply With Quote
Old 03-07-2006, 05:07 PM   PM User | #14
Bill Posters
Senior Coder

 
Join Date: Feb 2003
Posts: 1,665
Thanks: 0
Thanked 27 Times in 25 Posts
Bill Posters will become famous soon enough
Quote:
Originally Posted by Error 404
PHP has short tags, which are enabled by default, which makes <? a valid starting tag for PHP. PHP therefore tries to parse the XML prologue which results in errors. The best solution is just to use:
PHP Code:
<?php echo '<?xml version="1.0" encoding="iso-8859-1"?>'?>
That explains why I've never encountered that particular problem.
I currently only serve up the XML declaration/prologue as part of a PHP-based content negotiation script, so it's already handled as necessary.

I also tend not to use short open tags, possibly as a consequence of offering PHP advice on web dev forums.
If I use and demonstrate verbose open tags, then I know they'll work regardless of whether short open tags are enabled in the person's PHP install.

Thx for the reminder, though.

Last edited by Bill Posters; 03-07-2006 at 05:12 PM..
Bill Posters is offline   Reply With Quote
Old 03-07-2006, 05:56 PM   PM User | #15
slushy77
New Coder

 
Join Date: Jan 2006
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
slushy77 is an unknown quantity at this point
I've seen IE 5.5 break code which uses <?xml...?>, but not IE 6. which goes to show how important it is to test webpages using humans.
__________________
live every day as if it was your first
slushy77 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:59 PM.


Advertisement
Log in to turn off these ads.