473,397 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Why does a browser dispaly this as xhtml

Why o Why does a browser treat this xml file as an xhtml file.
<!DOCTYPE xc:content [
<!ENTITY % xhtml PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
%xhtml;
]>

<xc:xcontent xmlns:xc="http://www.wolterinkwebdesign.com/xml/xcontent" xmlns="http://www.w3.org/1999/xhtml" module="news">
<xc:nieuwsbericht>
<xc:id>1</xc:id>
<xc:title type="string"><![CDATA[Rob H slaat busruit kapot]]></xc:title>
<xc:date type="date"><![CDATA[2004-01-26]]></xc:date>
<xc:plaatje type="img"> <xc:empty/></xc:plaatje>

<xc:content type="html">
<p>Het kan &nbsp; ook neit naders, robh slaat de<em> busruit ui de</em> gelersch taxi, kerls wat is die kerls <strong>stark</strong> <img src="/xcm_v1.0/js/fck_editor/editor/images/smiley/msn/wink_smile.gif" border="0" alt=""/></p>
</xc:content>

</xc:nieuwsbericht>
</xc:xcontent>


I think i know why, because i included xhtml entities.
But i think the browser shoudl not show this as xhtml. Why does it do that!!?1
Jul 20 '05 #1
3 1347


Tjerk Wolterink wrote:
Why o Why does a browser treat this xml file as an xhtml file.
<!DOCTYPE xc:content [
<!ENTITY % xhtml PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
%xhtml;
]>

<xc:xcontent xmlns:xc="http://www.wolterinkwebdesign.com/xml/xcontent"
xmlns="http://www.w3.org/1999/xhtml" module="news"> ^^^^^^^^^^^^^^^^^^^^^^^^^^^ XHTML namespace as default namespace
<xc:nieuwsbericht>
<xc:id>1</xc:id>
<xc:title type="string"><![CDATA[Rob H slaat busruit
kapot]]></xc:title>
<xc:date type="date"><![CDATA[2004-01-26]]></xc:date>
<xc:plaatje type="img"> <xc:empty/></xc:plaatje>

<xc:content type="html">
<p>Het kan &nbsp; ook neit naders, robh slaat de<em> busruit
ui de</em> gelersch taxi, kerls wat is die kerls <strong>stark</strong>
<img
src="/xcm_v1.0/js/fck_editor/editor/images/smiley/msn/wink_smile.gif"
border="0" alt=""/></p>


Elements in the default namespace which the browser thinks it knows
about and can render as XHTML elements, it then probably does so.

So I guess (you haven't told us excactly what is happening) that the
browser treats the document as an XML document containing some XHTML
elements which it renders as such, displaying the text content of
elemens in a namespace the browser doesn't know. I don't think it is
treated as a complete XHTML document.
If that is Mozilla, what does page info says?
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #2
Martin Honnen wrote:


Tjerk Wolterink wrote:
Why o Why does a browser treat this xml file as an xhtml file.
<!DOCTYPE xc:content [
<!ENTITY % xhtml PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
%xhtml;
]>

<xc:xcontent xmlns:xc="http://www.wolterinkwebdesign.com/xml/xcontent"
xmlns="http://www.w3.org/1999/xhtml" module="news">
^^^^^^^^^^^^^^^^^^^^^^^^^^^ XHTML namespace as default namespace
<xc:nieuwsbericht>
<xc:id>1</xc:id>
<xc:title type="string"><![CDATA[Rob H slaat busruit
kapot]]></xc:title>
<xc:date type="date"><![CDATA[2004-01-26]]></xc:date>
<xc:plaatje type="img"> <xc:empty/></xc:plaatje>

<xc:content type="html">
<p>Het kan &nbsp; ook neit naders, robh slaat de<em>
busruit ui de</em> gelersch taxi, kerls wat is die kerls
<strong>stark</strong> <img
src="/xcm_v1.0/js/fck_editor/editor/images/smiley/msn/wink_smile.gif"
border="0" alt=""/></p>

Elements in the default namespace which the browser thinks it knows
about and can render as XHTML elements, it then probably does so.

So I guess (you haven't told us excactly what is happening


It displays the same as a xhtml document like this (just the body):

<body>
Rob H slaat busruit kapot 2004-01-26
<p>Het kan &nbsp; ook neit naders, robh slaat de<em>
busruit ui de</em> gelersch taxi, kerls wat is die kerls
<strong>stark</strong> <img src="/xcm_v1.0/js/fck_editor/editor/images/smiley/msn/wink_smile.gif"
border="0" alt=""/></p>
</body>

) that the
browser treats the document as an XML document containing some XHTML
elements which it renders as such, displaying the text content of
elemens in a namespace the browser doesn't know.
True
I don't think it is
treated as a complete XHTML document.
If that is Mozilla, what does page info says?
Type= text/xml

But it would be usefull for me if it renders it like a tree, like when it does
when the document does not contains any xhtml elements.

I think this is just an implementation design choice of the browser-programmers.
Too bad they didnt do it my way! :-)

Jul 20 '05 #3


Tjerk Wolterink wrote:

But it would be usefull for me if it renders it like a tree, like when
it does
when the document does not contains any xhtml elements.

I think this is just an implementation design choice of the
browser-programmers.
Too bad they didnt do it my way! :-)


Not sure if Mozilla can be configured to do different, you might want to
ask in a Mozilla group. But of course it will be difficult to define
what kind of documents should be "tree rendered" and which not, Mozilla
supports at least XHTML and MathML elements, special builds SVG or
XForms too.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #4

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

Similar topics

5
by: Stella | last post by:
Hi, I am attempting to create a site which validates as XHTML 1.1. So far I have got it fully validated but I am not happy with the way Internet Explorer displays the site when the window is...
14
by: Gérard Talbot | last post by:
I personally disagree with the Viewable in Any browser campain. The site is frankly outdated, seems to be no longer maitained, has several recommendations that don't make a lot of sense anymore. In...
22
by: Gianni Rondinini | last post by:
hi all. please excuse the misusage of some tech terms, but writing in english is not as easy as in italian :) i'm designing our new website and, since i want to do something that will last as...
20
by: Alan Silver | last post by:
Hello, I have read about the problems that IE has when using a doctype of HTML 4.01 Transitional. I was advised to use Strict wherever possible. My question is, does the same apply to XHTML...
44
by: rhythmace | last post by:
W3C HTML validator passes this: .... <script type="text/javascript" src="foo.js"> <script type="text/javascript"> ....script in here... </script> ....
5
by: Ted Ngo | last post by:
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { txtSource.Focus(); frmMain.Visible = true; divWait.Visible = false; btnsubmit.Visible = true;
17
by: seajay | last post by:
Hello, I noticed something strange when I was composing a XHTML document with CSS The following DOCTYPE causes the page to display differently on Fireflox 1.0.6 and Internet Explorer 6...
9
by: -Lost | last post by:
In Firefox and Safari for example, if I serve my XHTML documents as application/xml or xhtml+xml they only display the top inch or so of the document. In Opera it says "object has been blocked."...
4
by: andycain | last post by:
Hello guys. Developing a site using XTHML 1.0 Strict Doctype with CSS and I'm getting problems with getting the site to display properly in Firefox, Opera, Netscape and IE. Thing is it...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...

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.