Why does a browser dispaly this as xhtml

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tjerk Wolterink

    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.wolterinkwe bdesign.com/xml/xcontent" xmlns="http://www.w3.org/1999/xhtml" module="news">
    <xc:nieuwsberic ht>
    <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:nieuwsberich t>
    </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
  • Martin Honnen

    #2
    Re: Why does a browser dispaly this as xhtml



    Tjerk Wolterink wrote:
    [color=blue]
    > 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.wolterinkwe bdesign.com/xml/xcontent"
    > xmlns="http://www.w3.org/1999/xhtml" module="news">[/color]
    ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ XHTML namespace as default namespace
    [color=blue]
    > <xc:nieuwsberic ht>
    > <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>[/color]

    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

    Comment

    • Tjerk Wolterink

      #3
      Re: Why does a browser dispaly this as xhtml

      Martin Honnen wrote:
      [color=blue]
      >
      >
      > Tjerk Wolterink wrote:
      >[color=green]
      >> 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.wolterinkwe bdesign.com/xml/xcontent"
      >> xmlns="http://www.w3.org/1999/xhtml" module="news">[/color]
      >
      > ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ XHTML namespace as default namespace
      >[color=green]
      >> <xc:nieuwsberic ht>
      >> <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>[/color]
      >
      >
      > 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[/color]

      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>

      [color=blue]
      > ) 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.[/color]

      True
      [color=blue]
      > I don't think it is
      > treated as a complete XHTML document.
      > If that is Mozilla, what does page info says?[/color]

      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! :-)
      [color=blue]
      >[/color]

      Comment

      • Martin Honnen

        #4
        Re: Why does a browser dispaly this as xhtml



        Tjerk Wolterink wrote:

        [color=blue]
        > 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! :-)[/color]

        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

        Comment

        Working...