homepage with custom dtd ?

G

gregory

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 ?
 
D

David Dorward

gregory said:
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.
 
D

David Carlisle

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,246
Members
46,841
Latest member
WilmerBelg

Latest Threads

Top