If you write clean code, there are no errors in it.
If there are, then these errors are on parser side
and you dont have the power and influence over them...
And why would you want to write erroneous code in the first place? =S
But seriously - if that mode gets implemented it should be possible
to enable only through menus-preferences and not through some
by default install appearing button as it makes no sense for
an average houswife - would be only confusing...
marekmand
Probably Martin wants to use Opera as a kind of validator when he writes
pages. May be that's why he needs the developper mode. This would mean
that doesn't want to write erroneous code. He probably even wants to
write error-free code (as in fact I would also like me to write :-)
And he needs the surfer mode when he onyly wants to have an usual
surfing experience.
This would be a good option. Amaya does something like this, I think,
but it lacks so much functionality that you can't really use it.
Martin pointed out a few mistakes I had made in the 30 Days series,
which was XHTML 1.0 Strict. But mistakes happen. I had checked it
several times, but the mistakes were subtle enough that I hadn't seen
them, and Opera was able to error-correct enough that I didn't see the
problem.
With the mistake that I had made (I removed a <span> without removing
the </span>) it would be easy to spot and throw and error, saying:
"line 37: closing tag found without opening tag: </span>"
TjL
--
30 Days to becoming an Opera Lover http://www.tntluoma.com/switch
Day 30: And More... http://tntluoma.com/opera/lover/day30-andmore/
OperaBlog: Beyond30 http://tntluoma.com/opera/beyond30/
>Martin Schrode wrote:
>> For developers, when creating HTML pages, it would be good if Opera
>> would use a strict rendering mode. If there's an error, stop displaying
>> the page. For casual surfing it would be best if Opera would try to do
>> some guessing. So I'd like to be able to toggle between developer and
>> surfer mode.
>
>This would be a good option. Amaya does something like this, I think,
>but it lacks so much functionality that you can't really use it.
>
>Martin pointed out a few mistakes I had made in the 30 Days series,
>which was XHTML 1.0 Strict. But mistakes happen. I had checked it
>several times, but the mistakes were subtle enough that I hadn't seen
>them, and Opera was able to error-correct enough that I didn't see the
>problem.
>
>With the mistake that I had made (I removed a <span> without removing
>the </span>) it would be easy to spot and throw and error, saying:
>
>"line 37: closing tag found without opening tag: </span>"
Why not just validate your code...?
--
Tim Altman
roy...@myrealSP-AMbox.com
No SP-AM is good spam.
People are laizy - you know =)
And why validate - why not just write cean code in the first place...?
marekmand
You can write clean code and still make mistakes. We're not
perfect, you know. ;)
People make mistakes in web pages for the same reasons that people make
mistakes anywhere else, including spelling mistakes.
The difference is that mistakes here can cause the page to render
incorrectly.
I don't intend to write bad code.
I do validate my pages.
But mistakes in HTML can happen the same way mistakes happen in any
"language":
- people might make mistakes that they don't realize (not as familiar
with the language as some other people)
- people might make mistakes that are unintentional (hrm...
unintentional mistake... that might be a little tiny bit redundant... I
don't know that one could make an intentional mistake, after all, how
could you then say it was a mistake?).
Anyway, I can't tell you how many times I've written a page and then
decided to clean something up and accidentally left a </div> or a
</span>... if it is a quick edit, you might not always validate.
And it gets harder to deal with the more complicated the site gets, and
as you grow from building static pages to using scripting like PHP where
one "page" comes from several source files.
>>>Why not just validate your code...?
..
>Anyway, I can't tell you how many times I've written a page and then
>decided to clean something up and accidentally left a </div> or a
></span>... if it is a quick edit, you might not always validate.
That's a problem I recognize :)
If you'd send your pages as text/xhtml+xml, Opera would treat them like
well formed XML instead of like tagsoup, and stop parsing after it finds
an error.
--
If you don't like having choices | Rijk van Geijtenbeek
made for you, you should start | Documentation & QA
making your own. - Neal Stephenson | mailto:ri...@opera.com
> If you'd send your pages as text/xhtml+xml, Opera would treat them like
> well formed XML instead of like tagsoup, and stop parsing after it finds
> an error.
LOL.... and that would only shut out how many browsers?
quick test.... Moz 1.1 and IE6 don't show it, but Opera6.05 does ;-)
Hrm... I suppose I could sniff for Opera and send it a different file type.
>Rijk van Geijtenbeek wrote:
>
>> If you'd send your pages as text/xhtml+xml, Opera would treat them like
>> well formed XML instead of like tagsoup, and stop parsing after it finds
>> an error.
>
>LOL.... and that would only shut out how many browsers?
>
>quick test.... Moz 1.1 and IE6 don't show it, but Opera6.05 does ;-)
>
>Hrm... I suppose I could sniff for Opera and send it a different file type.
I admit that the intended audience of the Opera Lover series is mainly
non-Opera users :)
Ditto for the average househusband. In fact, that applies to any average
housespouse.
Is Opera aimed at the average housespouse market anyways?:)
Leons Petrazickis
import java.lang.disclaimer;
> If you'd send your pages as text/xhtml+xml, Opera would treat them
> like well formed XML instead of like tagsoup, and stop parsing
> after it finds an error.
text/xhtml+xml? application/xhtml+xml is registered, and Opera supports
it, as well as text/xml and application/xml. What's the sense of
another MIME type for XHTML?
> Ditto for the average househusband. In fact, that applies to any average
> housespouse.
>
> Is Opera aimed at the average housespouse market anyways?:)
If not, whom is it aimed for?
One target is people who don't have lots of resources - which sounds like a
house spouse more than an office worker. (Office workers often don't have a
choice about which browser they use).
Of course when house spouses can't get to their bank's web page, they switch to
a browser that does work there.
I think the MIME type application/xhtml+xml was intended. I find the strict
to draconian error handling in XML to be very helpful as an author. It is
more immediately annoying (if you do forget a </span>, you will get an error
message instead of the rest of the page), but it is a real time saver in the
longer run as you will not be as plagued with the subtle ways of failing
(some Javascript or style that doesn't work as intended on browser X).
The XML window is really a debugger, though it is more cryptic than it needs
to be. The fatal error messages always include two numbers NN:MM, where NN
is the line number where the error was discovered and MM is the character
position in that line. This is truly helpful, especially as it only triggers
on well-formedness errors (the nasty sort of error that is particularily
likely to cause problems) and not on validity errors (for those you need to
use the validator). Well-formed first, valid afterwards makes a lot of
sense.
Jonny Axelsson,
Documentation,
Opera Software
Really?? Can we have an example, please?
Also, would this work if I set the MIME type on a local drive (Windows98
> Start > Settings > Folder Options > File Types > XHTML file > Edit >
Content Type (MIME) = application/xhtml+xml). I tried it and Opera
still parsed my bad markup, probably because setting the MIME type this
way doesn't really set the MIME type.
> Really?? Can we have an example, please?
>
> Also, would this work if I set the MIME type on a local drive (Windows98
> > Start > Settings > Folder Options > File Types > XHTML file > Edit >
> Content Type (MIME) = application/xhtml+xml). I tried it and Opera
> still parsed my bad markup, probably because setting the MIME type this
> way doesn't really set the MIME type.
What version of Opera do you have? This MIME type is rather recent. We added
it as soon as the RFC came out, but that still means that versions of Opera
earlier than 6.0 will not process it. This really doesn't matter. You can
still use text/xml or application/xml for the same effect.
What does matter is the namespace. If it hasn't got the XHTML namespace, it
isn't XHTML. Make sure the document starts with:
<html xmlns="http://www.w3.org/1999/xhtml">
The XML namespace attribute (xmlns) will be treated as an unknown attribute
by an HTML browser (or Opera if you later save the same document as .html,
text/html), so apart from that the document will no longer validate as HTML
4.01, it will do no harm.
You can also (in Opera and Mozilla) add XHTML to any XML document with the
same mechanism, but in this case you should use the prefixed version:
<paragraph>Some arbitrary XML with <x:a href="http://www.example.org"
xmlns:x="http://www.w3.org/1999/xhtml">an HTML link</x:a> embedded.
</paragraph>
For "x" you can use any string, but for IE compatibiliry it is best to use
"html", that is <html:a ...>...</html:a>.
Sure:
http://www.tntluoma.com/tests/badlyformed.xhtml
> Also, would this work if I set the MIME type on a local drive (Windows98
> > Start > Settings > Folder Options > File Types > XHTML file > Edit >
> Content Type (MIME) = application/xhtml+xml). I tried it and Opera
> still parsed my bad markup, probably because setting the MIME type this
> way doesn't really set the MIME type.
Try adding this line:
<meta http-equiv="content-type"
content="application/xhtml+xml; charset=iso-8859-1" />
in the <head> </head>
TjL
ps -- I talked about this topic on 'beyond30' today:
http://tntluoma.com/opera/beyond30/
--
30 Days to becoming an Opera Lover http://www.tntluoma.com/switch
OperaBlog: Beyond30 http://tntluoma.com/opera/beyond30/
Thanks, that's cool!
> Try adding this line:
>
> <meta http-equiv="content-type"
> content="application/xhtml+xml; charset=iso-8859-1" />
Hmm... that doesn't work. Doesn't matter anyway.