XHTML: browser rendering parse tree instead. Why?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Neil Zanella

    XHTML: browser rendering parse tree instead. Why?

    Hello,

    When I save the following file with the .xhtml or .xml extension I get
    the XML parse tree and the following message instead of the actual
    document.

    This XML file does not appear to have any style information
    associated with it. The document tree is shown below.

    I wonder if anyone could explain the above message. Even when I place
    <style>
    information in the <head> element I still get the same message.

    Thanks,

    Neil

    <?xml version="1.0"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http//www.w3.org/1999/xhtml">
    <head>
    <title>?</title>
    </head>
    <body>
    </body>
    </html>
  • Neil Zanella

    #2
    Re: XHTML: browser rendering parse tree instead. Why?


    Aha! A missing or incorrectly written namespace can cause such a serious
    error (altough the error message was useless). The XML Namespace should
    have been:

    <html xmlns="http//www.w3.org/1999/xhtml">

    That fixes it.

    Regards,

    Neil

    On 7 Jul 2003, Neil Zanella wrote:
    [color=blue]
    > This XML file does not appear to have any style information
    > associated with it. The document tree is shown below.[/color]

    [snip]
    [color=blue]
    > <?xml version="1.0"?>
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    > <html xmlns="http//www.w3.org/1999/xhtml">[/color]


    Comment

    Working...