homepage with custom dtd ?

Discussion in 'XML' started by gregory, Apr 27, 2005.

  1. gregory

    gregory Guest

    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 ?
     
    gregory, Apr 27, 2005
    #1
    1. Advertising

  2. 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
     
    David Dorward, Apr 27, 2005
    #2
    1. Advertising

  3. (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
     
    David Carlisle, Apr 27, 2005
    #3
  4. In article <>,
    (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

    http://hsivonen.iki.fi/
    Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
     
    Henri Sivonen, May 3, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hans Kesting

    Re: Back to homepage on session timeout

    Hans Kesting, Aug 13, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    379
    Hans Kesting
    Aug 13, 2003
  2. Joseph Tilian
    Replies:
    0
    Views:
    380
    Joseph Tilian
    Dec 21, 2004
  3. Ronald Fischer
    Replies:
    4
    Views:
    1,809
    Ronald Fischer
    Mar 17, 2005
  4. test
    Replies:
    2
    Views:
    2,193
    Oliver Wong
    Jul 28, 2006
  5. Uncle Noah
    Replies:
    0
    Views:
    509
    Uncle Noah
    Sep 26, 2007
Loading...

Share This Page