473,788 Members | 3,068 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Opera guesses encoding for "applicatio n/xml"

Hi!

Okay, so positions on "text/html" XHTML are totally contradicting. Anyway!
I hope there's more consensus about "applicatio n/xml" XHTML.

I've recently learned that Opera 9.0b2 does not only evaluate HTTP header,
BOM and XML declaration to determine the character encoding of an XHTML
document sent as "applicatio n/xml", but also the "meta" element. For
example, <http://schneegans.de/sv/test-cases/?case=meta-only-encoding> is
rendered as "Česká republika". In contrast, Firefox displays "?esk?
republika", and IE even aborts parsing.

If you agree with me and think that this behavior is wrong, you might
want to post a follow-up to <news:op******* ***********@new s.opera.com>.

--
All free men, wherever they may live, are citizens of Denmark. And
therefore, as a free man, I take pride in the words "Jeg er dansker!"
Jun 8 '06
43 3177
"Spartanicu s" wrote:
If you are not specific and only say "More powerful means for
validation", then all I can do is point to the main page that
includes a refute of this most common misconception.
Do you dispute the fact that XML Schema validation is more powerful than
DTD validation?
All additional XHTML constraints can be emulated for HTML validation.
Using freaky regular expressions?
This is noted on the quoted resource, and it links to an explanation of
how to change non DTD constraints, again using a common example.
Most authors don't want to create a custom DTD or a custom SGML
declaration. As long as there's no "strict" HTML validation service
available on the web, your remarks have no practical implications.
That said, the practical value of being able to machine check even for
all additional constraints that are part of XHTML 1.x (some of which are
only part of XHTML 1.1 such as your "<span lang="klingon"> ...</span>"
example) is nil as long as the result is parsed by HTML clients.
Thank you. Appendix C documents are parsed by HTML clients as well.
Loose unqualified remarks such as "simpler syntax" don't allow for a
proper response.
Do you dispute the fact that XML syntax is simpler than SGML syntax?
You've lost me, are you suggesting that "<p ltr<span></span</p>" is
proper syntax and/or valid under XHTML?
'<p ltr<span></span</p>' is valid HTML, '<p dir="ltr"><span ></span></p>'
is the corresponding XHTML syntax. So which one is simpler IYO?
Other flaws do not form an argument for a claim that IE supports XHTML.
Nobody in this thread claims that IE supports XHTML.

Dou you dispute the fact that IE neither supports XHTML nor HTML?
Now I want you to present an XHTML 1.0 document that conforms to
Appendix C and is not supported by IE.


You forgot to answer this one.
You are avoiding the point made that contrary to your claim that the
media type used made no difference, that a document served as
application/xml may not be recognized as XHTML.


That's what the W3C says. It does not happen nevertheless.

--
All free men, wherever they may live, are citizens of Denmark. And
therefore, as a free man, I take pride in the words "Jeg er dansker!"
Jun 9 '06 #11
Christoph Schneegans <Ch*******@Schn eegans.de> writes:
Most authors don't want to create a custom DTD or a custom SGML
declaration. As long as there's no "strict" HTML validation service
available on the web, your remarks have no practical implications.


Authors don't necessarily have to *create* them theirselves. For the
creation of static files the idea of online validation is totally lost
on me anyway. That should and easily can be part of the local authoring
process, whatever way you like it.

I know that you are also aware of the inherent SGML syntax features that
cannot be made XML(or even HTML UA)-compatible with any custom SGML
declaration, and I'm surprised that you didn't mention them :)

(For dynamic content -- any CMS of sorts -- I'd actually prefer XHTML
syntax, since even lowest-end Linux hosting usually comes with PHP
bundled with the expat library, and _trivially_ allows for verifying
fully-tagged input and some kind of homegrown content model restraints.)
As a personal note, I am a bit flabbergasted by the origin of discussion
at large. Any service that doesn't advertise itself inappropriately is
useful within the bounds of its documentation. While I actually do
believe that Christoph's service is not about to hit (and educate) its
target audience at all, the W3C markup validation service (in the SGML
sense, I won't even mention X(HT)ML) is deliberately aiming at the
clue-underprivileged and seldom criticised as such over here.
--
||| hexadecimal EBB
o-o decimal 3771
--oOo--( )--oOo-- octal 7273
205 goodbye binary 111010111011
Jun 9 '06 #12
Christoph Schneegans wrote:

'<p ltr<span></span</p>' is valid HTML, [...]

HTML, yes. XHTML, no.
It is, however, meaningless. A parser ignores all the mystery components
and it reduces to '<p>'.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jun 9 '06 #13
Jim Moe wrote:
'<p ltr<span></span</p>' is valid HTML, [...]
It is, however, meaningless.


It is exactly equivalent to '<p dir="ltr"><span ></span></p>' in HTML. If
you don't believe it, feed <http://validator.w3.or g/fragment-upload.html>
with

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<title></title>
<p ltr<span></span</p>

and

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<title></title>
<p dir="ltr"><span ></span></p>

and enable the "Show Parse Tree" option.
A parser ignores all the mystery components and it reduces to '<p>'.


That depends on the parser.

--
All free men, wherever they may live, are citizens of Denmark. And
therefore, as a free man, I take pride in the words "Jeg er dansker!"
Jun 9 '06 #14
Christoph Schneegans <Ch*******@Schn eegans.de> wrote:
If you are not specific and only say "More powerful means for
validation", then all I can do is point to the main page that
includes a refute of this most common misconception.
Do you dispute the fact that XML Schema validation is more powerful than
DTD validation?


Before changing to another topic, first let's finish off your original
claim; do you agree that XHTML DTD based validation is not "more
powerful" than HTML DTD validation?
All additional XHTML constraints can be emulated for HTML validation.


Using freaky regular expressions?


By editing the files used by the validator, this doesn't involve regular
expressions.
This is noted on the quoted resource, and it links to an explanation of
how to change non DTD constraints, again using a common example.


Most authors don't want to create a custom DTD or a custom SGML
declaration.


No-one has anything to gain from checking text/html documents for the
extra constraints that XHTML requires, by definition this includes "most
authors".
As long as there's no "strict" HTML validation service
available on the web, your remarks have no practical implications.
If you want to claim practical relevance then you need to acknowledge
the at best very limited value of validation in the whole, and the fact
that checking for the extra constraints has no benefit at all for
content served as text/html.

That said, I'm aware of at least one online HTML validator that has an
option to impose additional constraints (Nick Kew's Page Valet).
That said, the practical value of being able to machine check even for
all additional constraints that are part of XHTML 1.x (some of which are
only part of XHTML 1.1 such as your "<span lang="klingon"> ...</span>"
example) is nil as long as the result is parsed by HTML clients.


Thank you. Appendix C documents are parsed by HTML clients as well.


So do you now concede that there is no basis whatsoever for your
suggestion that checking text/html documents for the additional XHTML
constraints has any practical relevance or value?
Loose unqualified remarks such as "simpler syntax" don't allow for a
proper response.


Do you dispute the fact that XML syntax is simpler than SGML syntax?


Again before having another change of subject, I'm still trying to find
out what you meant by your original claim that XHTML syntax is simpler
than HTML syntax.
You've lost me, are you suggesting that "<p ltr<span></span</p>" is
proper syntax and/or valid under XHTML?


'<p ltr<span></span</p>' is valid HTML, '<p dir="ltr"><span ></span></p>'
is the corresponding XHTML syntax. So which one is simpler IYO?


What you refer to as "valid HTML" is an error that isn't picked up by a
validator using the public DTD. This does not form an argument to
declare XHTML "simpler" (strange way to raise a point about a certain
HTML error being missed). If the fact that this error isn't flagged
under the public DTD bothers you, it is easily fixed, "<p
ltr<span></span</p>" doesn't validate in my HTML validation process.
Other flaws do not form an argument for a claim that IE supports XHTML.


Nobody in this thread claims that IE supports XHTML.


You have a short or selective memory:
For XHTML? More powerful means for validation, simpler syntax. For
text/html? IE wouldn't support it otherwise. Dou you dispute the fact that IE neither supports XHTML nor HTML?


Again: other flaws such as possibly not parsing a certain HTML construct
correctly do not form an argument for your claim that IE supports XHTML.
Now I want you to present an XHTML 1.0 document that conforms to
Appendix C and is not supported by IE.
You forgot to answer this one.


Again: IE does not support XHTML at all. Like almost all other HTML
parsers IE's error recovery mechanism allows XHTML served as text/html
to be parsed as pseudo HTML without necessarily causing problems. This
does not demonstrate "support", it merely demonstrates error recovery at
work when parsing tag soup.
You are avoiding the point made that contrary to your claim that the
media type used made no difference, that a document served as
application/xml may not be recognized as XHTML.


That's what the W3C says. It does not happen nevertheless.


You mean that you haven't seen it happen, excuse me for attaching little
to no value to that.

--
Spartanicus
Jun 9 '06 #15
"Spartanicu s" wrote:
Do you dispute the fact that XML Schema validation is more powerful than
DTD validation?
Before changing to another topic, first let's finish off your original
claim;


My original claim was that XHTML allows more powerful validation. I really
don't know why you assume I was referring to XML DTD based validation.
do you agree that XHTML DTD based validation is not "more powerful"
than HTML DTD validation?
Sure. This has no relevance at all. If you want meaningful validation
results, use an XML Schema validator such as <http://schneegans.de/sv/>.
All additional XHTML constraints can be emulated for HTML validation.


Using freaky regular expressions?


By editing the files used by the validator, this doesn't involve regular
expressions.


If I wanted to disallow

<p title=""style=" "></p>

in favor of

<p title="" style=""></p>

in my HTML documents, how would I do that?
This is noted on the quoted resource, and it links to an explanation of
how to change non DTD constraints, again using a common example.


Most authors don't want to create a custom DTD or a custom SGML
declaration.


No-one has anything to gain from checking text/html documents for the
extra constraints that XHTML requires, by definition this includes "most
authors".


Far from it! Many authors wonder why e.g.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head><title> </title></head>
<body>
<p>foo</p>
<!------>
<p>bar</p>
<!------>
</body>
</html>

is not displayed in Firefox as intended, although this document is valid
according to the W3C Validator. <http://valet.webthing. com/page/> doesn't
output a warning either, BTW.
Again before having another change of subject, I'm still trying to find
out what you meant by your original claim that XHTML syntax is simpler
than HTML syntax.
'<p ltr<span></span</p>' is valid HTML syntax. It's not simple at all.
What you refer to as "valid HTML" is an error that isn't picked up by a
validator using the public DTD.
Which specification says that '<p ltr<span></span</p>' is not valid HTML?
Now I want you to present an XHTML 1.0 document that conforms to
Appendix C and is not supported by IE.
Again: IE does not support XHTML at all.


Okay, then your task should be quite easy.
Like almost all other HTML parsers IE's error recovery mechanism
allows XHTML served as text/html to be parsed as pseudo HTML without
necessarily causing problems.


IE supports anything that is labelled "text/html" and has some angle
brackets in it. In this sense, it also supports HTML or XHTML. IE doesn't
parse "text/html" XHTML using an XML parser, and it doesn't parse
"text/html" HTML using an HTML parser either. The difference is that I
don't suggest the former, while you do suggest the latter.
You are avoiding the point made that contrary to your claim that the
media type used made no difference, that a document served as
application/xml may not be recognized as XHTML.


That's what the W3C says. It does not happen nevertheless.


You mean that you haven't seen it happen, excuse me for attaching little
to no value to that.


You have't seen it happen either. Otherwise you would happily disclose the
name of that user agent.

--
All free men, wherever they may live, are citizens of Denmark. And
therefore, as a free man, I take pride in the words "Jeg er dansker!"
Jun 10 '06 #16
In article <ef************ *************** *****@4ax.com>,
Spartanicus <in*****@invali d.invalid> wrote:
That said, I'm aware of at least one online HTML validator that has an
option to impose additional constraints (Nick Kew's Page Valet).


You may also be interested in
http://hsivonen.iki.fi/validator/
which does not play along with the HTML-as-SGML fiction and allows RELAX
NG and Schematron 1.5 to be used with HTML.

--
Henri Sivonen
hs******@iki.fi
http://hsivonen.iki.fi/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
Jun 10 '06 #17
In article <e6**********@n ews.christoph.s chneegans.de>,
Christoph Schneegans <Ch*******@Schn eegans.de> wrote:
My original claim was that XHTML allows more powerful validation. I really
don't know why you assume I was referring to XML DTD based validation.
:-)
If I wanted to disallow

<p title=""style=" "></p>

in favor of

<p title="" style=""></p>

in my HTML documents, how would I do that?


But is that a reasonable thing to want?

Isn't kind of like wanting an app that processes XML to make a
difference between
&lt;
and
<![CDATA[<]]>
?

--
Henri Sivonen
hs******@iki.fi
http://hsivonen.iki.fi/
Validation Service for RELAX NG: http://hsivonen.iki.fi/validator/
Jun 10 '06 #18
Henri Sivonen wrote:
If I wanted to disallow

<p title=""style=" "></p>

in favor of

<p title="" style=""></p>

in my HTML documents, how would I do that?


But is that a reasonable thing to want?


Omitting whitespace between attribute specifications is almost always
a typo, not a deliberate decision.

--
All free men, wherever they may live, are citizens of Denmark. And
therefore, as a free man, I take pride in the words "Jeg er dansker!"
Jun 10 '06 #19
In article <e6**********@n ews.christoph.s chneegans.de>,
Christoph Schneegans <Ch*******@Schn eegans.de> wrote:
Henri Sivonen wrote:
If I wanted to disallow

<p title=""style=" "></p>

in favor of

<p title="" style=""></p>

in my HTML documents, how would I do that?


But is that a reasonable thing to want?


Omitting whitespace between attribute specifications is almost always
a typo, not a deliberate decision.


But with HTML it is harmless--like making the typo of putting two spaces
instead of one between attributes.

--
Henri Sivonen
hs******@iki.fi
http://hsivonen.iki.fi/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
Jun 10 '06 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
8608
by: Tjerk Wolterink | last post by:
Hello, I've xml code that looks like this: <?xml version="1.0" encoding="ISO-8859-1"?> <xc:xcontent xmlns:xc="http://www.wolterinkwebdesign.com/xml/xcontent" xmlns="http://www.w3.org/1999/xhtml">
2
1949
by: Ferd Biffle | last post by:
Hello! I have an Excel XML feed from an Enterprise PDM system that is basically a flat text file with XML tags: <?xml version="1.0" encoding="UTF-8"?> <Import> <Row> <ID>1</ID> <Level>0</Level>
1
1172
by: ouioui2000 | last post by:
Hi, I try to generate xml flow with javascript in a new windows. Here is my javascritp code : <code> fenetrePopUp = window.open('','_blank','width=500,height=300,scrollbars=yes,status=yes,resizable=yes'); fenetrePopUp.document.open("application/xml+xsl"); fenetrePopUp.document.write(myCodeXML); </code>
3
11816
by: Gustavo L. Fabro | last post by:
Greetings! I'm testing VS 2005 Beta 2, and I've compiled a program that runs just fine on my computer (where VS is installed). I've tried to run this same program on another computer (after having installed MS .NET Framework 2.0 Beta 2 on it, from http://www.microsoft.com/downloads/details.aspx?FamilyId=7ABD8C8F-287E-4C7E-9A4A-A4ECFF40FC8E&displaylang=en), but got the following message:
4
1663
by: Keith Chadwick | last post by:
I am having some trouble referencing an Application("myVar") variable from within a module.vb file on my ASP.NET site. According to the documentation I should be able to reference System.Web.HttpApplication but it does not seem to like that one bit. I also have a MSXML2.DOMDocument30 defined as a public object within the vb module which is loaded during the application start up with a bunch of XML. What is weird is that the data contained...
2
1618
by: Joel Vazquez | last post by:
Visual Basic.NET Application RunTime Crashes and Stalls Im a newbie if you could say in .NET ive been working with it the past 3 months and have done lots of things with it, without any prior knowledge. I have a few question regarding the stability of my application. I have a synchronization application that connects to a service and send the results to SQL Server 2000. I got all my code in just one form.
9
5113
by: MrSpock | last post by:
1. Create a new Windows Application project. 2. Open the project properties and check "Make single instance application". 3. Build. 4. Go to the release folder and run the application. 5. Try to open a second instance of the application. This will cause an unhandled exception and the "Send Error Report" box shows up. Does this happen to anyone else, or is it just me? Debug info: "Unhandled exception at 0x00e149fd in...
0
1908
by: Phil | last post by:
I am writing an application (using Visual Studio 2003) that consumes a third party Web Service, but I receive the following error : Client found response content type of 'application/xml; charset=utf-8', but expected 'text/xml'. I can see the XML Document and it is properly structured. Is there any way to overide this and get .NET to process the response XML regardless of the Content Type Setting in the HTTP Response ?
1
1265
by: wingsganesh | last post by:
Hi guys, I know how load XMl file in Windows application.But comparing windows application , device application have some special feature. When i use the same code in device application i have bug called"Web Exception" Any body can help My code is:
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4069
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.