473,385 Members | 1,740 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,385 software developers and data experts.

homepage with custom dtd ?

1. server side - Content-Type: application/xhtml+xml, file: hello.xml
<?xml version="1.0" standalone='no'?>
<!DOCTYPE something SYSTEM "http://myserver/hello.dtd">
<something>Hello World !</something>

2. client side - IE, Mozilla, Opera, request: GET hello.xml, receiving data...

3. why clients don't want to download hello.dtd from myserver ?
Jul 20 '05 #1
3 1258
gregory wrote:
1. server side - Content-Type: application/xhtml+xml, file: hello.xml
<?xml version="1.0" standalone='no'?>
<!DOCTYPE something SYSTEM "http://myserver/hello.dtd">
<something>Hello World !</something>


That doesn't look like XHTML to me, I don't think the application/xhtml+xml
media type is OK for custom DTDs. Try application/xml.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 20 '05 #2
gr****@poczta.fm (gregory) writes:
1. server side - Content-Type: application/xhtml+xml, file: hello.xml
<?xml version="1.0" standalone='no'?>
<!DOCTYPE something SYSTEM "http://myserver/hello.dtd">
<something>Hello World !</something>

2. client side - IE, Mozilla, Opera, request: GET hello.xml, receiving data...

3. why clients don't want to download hello.dtd from myserver ?


Non validating parsers are allowed by the XML rec _not_ to resolve
references to external DTD files. Mozilaa family browsers never
download a DTD from a remote site. It has one or two "known" dtd (xhtml
and xhtml_mathml, essentially) and if it recognises that the doctype is
refering to those dtd it uses the dtd that is included in teh res/dtd
directory in its local installation directory. It never fetches teh dtd
file that is references. If you put a copy of hello.dtd in to your local
mozilla installation res/dtd directory then mozilla will read that file
if ever the doctype uses a system refernce that ends in hello.dtd
(whatever web site is given in the full system url)

this is often fairly annoying behaviour, but it is fully conformant with
the spec...

IE will fetch the dtd if you serve it with an XML mime type (you should
use application/xml not application/xhtml+xml as a) your file is not
xhtml and b) IE doesn't know the xhtml+xml type by defualt),

I'm not sure what opera does.

David
Jul 20 '05 #3
In article <56**************************@posting.google.com >,
gr****@poczta.fm (gregory) wrote:
<!DOCTYPE something SYSTEM "http://myserver/hello.dtd">
Why bother with a custom DTD?
3. why clients don't want to download hello.dtd from myserver ?


Because loading external entities would be a performance problem and
yield little or (more often) no benefit.

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

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

Similar topics

0
by: Mark Constant | last post by:
I was doing a test website where on one page somebody could select a Genre from a drop-down list and it would display every sub-listing under that specific Genre. If the user selected All it would...
1
by: rolear01 | last post by:
A php newbie with a problem! I have a form with a text area <form name=edit_front_page_form action="/test.php?page=front_page_updated" method=get> <p>Edit front page<br> <textarea cols=30...
2
by: arbpen | last post by:
I find it superfluous to have a 'Make Us Your Homepage' link/script, but there it is, I have boss who wants it. Anyway, this is the snippet that is throwing an error: <li style="border:0"><a...
3
by: bb nicole | last post by:
Below is my login function, it can work well, but after i include it at my homepage, the print message is in the login page... What should it do to make the print message invalid username or...
1
by: Macneed | last post by:
I want to write a code to determine the homepage content was change, but if the homepage is write by asp or something else, (e.g. livescore.com here) i can't get the real homepage content by the...
3
by: svjames | last post by:
heya guyzorz, just a quick q, for the life of me i cant find a way to obtain the value of a users browsers default homepage. Ive written a site that provides access to the internet on a certain...
2
by: pavi | last post by:
Anyone know how to set the Default homepage using javascript without prompting a pop up. Below is the code i used to set default home page. <a href="#"...
0
by: hani1987 | last post by:
hello I am a BE computer student and needed information for my BE project. The project is as follows We are developing a web application for a company. This involves setting up a wi-fi hotpot...
1
by: ewanm1 | last post by:
On opening IE7 I get a server application unavailable error instead of my homepage. If I click home or refresh my homepage then loads. I have tried numerous different sites, including intranet and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.