Loading ...
Sorry, an error occurred while loading the content.

bugwards compatibility, XHTML, embed

Expand Messages
  • Tobias Reif
    Hi, because the object element doesn t work in IE5.5- and NN4-, we use the embed element. For XHTML documents, Jon posted a tip: extend the XHTML DTD to be
    Message 1 of 6 , Oct 4, 2001
    View Source
    • 0 Attachment
      Hi,

      because the object element doesn't work in IE5.5- and NN4-, we use the
      embed element.

      For XHTML documents, Jon posted a tip: extend the XHTML DTD to be
      bugwards compatible.
      http://www.siliconpublishing.org/svgfaq/Starting.asp#3

      Now check
      http://www.pinkjuice.com/temp/SVG/embed.xhtml

      In NN, and IE5.5, @ the top of the canvas, there's "]>" displayed, from
      the internal subset delimiters.
      But even NN6.1 displays them.

      So: how to use the d#*& embed element in valid XHTML documents, and get
      them displayed correctly in the three browsers?

      here is the code:
      ...
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" [
      <!ELEMENT embed EMPTY>
      <!ATTLIST embed
      src CDATA #IMPLIED
      width CDATA #IMPLIED
      height CDATA #IMPLIED
      >
      <!ENTITY % inline "embed | a | %special; | %fontstyle; | %phrase; |
      %inline.forms;">
      <!ENTITY % block "embed | p | %heading; | div | %lists; | %blocktext;
      | fieldset | table">
      ]>
      ...
      check http://www.pinkjuice.com/temp/SVG/embed.xhtml for the rest.

      Tobi

      --
      Tobias Reif
      http://www.pinkjuice.com/myDigitalProfile.xhtml

      go_to('www.ruby-lang.org').get(ruby).play.create.have_fun
      http://www.pinkjuice.com/ruby/
    • Chris Lilley
      ... Note however that his sample code leaves some parts as an exercise to the reader... the code as given does not make pages using embed valid. ... Thats
      Message 2 of 6 , Oct 4, 2001
      View Source
      • 0 Attachment
        Tobias Reif wrote:
        >
        > Hi,
        >
        > because the object element doesn't work in IE5.5- and NN4-, we use the
        > embed element.
        >
        > For XHTML documents, Jon posted a tip: extend the XHTML DTD to be
        > bugwards compatible.
        > http://www.siliconpublishing.org/svgfaq/Starting.asp#3

        Note however that his sample code leaves some parts as an exercise to
        the reader... the code as given does not make pages using embed valid.

        > In NN, and IE5.5, @ the top of the canvas, there's "]>" displayed, from
        > the internal subset delimiters.

        Thats because those browsers do not have an XML parser

        > But even NN6.1 displays them.

        Tahts because this page does not trigger the xml path but triggers the
        legacy HTML path.


        > So: how to use the d#*& embed element in valid XHTML documents, and get
        > them displayed correctly in the three browsers?
        >
        > here is the code:
        > ...
        > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" [
        > <!ELEMENT embed EMPTY>
        > <!ATTLIST embed
        > src CDATA #IMPLIED
        > width CDATA #IMPLIED
        > height CDATA #IMPLIED
        > >
        > <!ENTITY % inline "embed | a | %special; | %fontstyle; | %phrase; |
        > %inline.forms;">

        Its good that you added the embed element to the content model (though
        you added it to inline, I would have added it to the content of block)
        but those entities are not allowed in the internal DTD subset.

        In fact, I think that a new driver DTD which has those declarations and
        then imports the XHTML 1.1 dtd is the way to go. So you just have a
        different doctype...

        --
        Chris
      • Tobias Reif
        Chris, ... ? ... I had added it to both:
        Message 3 of 6 , Oct 5, 2001
        View Source
        • 0 Attachment
          Chris,

          > Tahts because this page does not trigger the xml path but triggers the
          > legacy HTML path.

          ?

          > Its good that you added the embed element to the content model (though
          > you added it to inline, I would have added it to the content of block)

          I had added it to both:
          <!ENTITY % inline "embed | a | %special; | %fontstyle; | %phrase; |
          %inline.forms;">
          <!ENTITY % block "embed | p | %heading; | div | %lists; | %blocktext; |
          fieldset | table">

          > but those entities are not allowed in the internal DTD subset.

          That's what I thought, but XML-Spy didn't complain.

          > In fact, I think that a new driver DTD which has those declarations and
          > then imports the XHTML 1.1 dtd is the way to go. So you just have a
          > different doctype...

          I have to admit, I did a quick hack and tweaked the XHTML DTD.
          This
          http://www.pinkjuice.com/temp/SVG/embed.html
          is XHTML extended for bugwards compatibility, with the embed element.

          I should work @ least in in IE5.5+, NN6+, and NN4.7+

          According to XML Spy, it's valid in respect to
          http://www.pinkjuice.com/temp/SVG/buggy_XHTML.dtd

          Any bugs in my buggy_XHTML? ;)

          Tobi

          --
          Tobias Reif
          http://www.pinkjuice.com/myDigitalProfile.xhtml

          go_to('www.ruby-lang.org').get(ruby).play.create.have_fun
          http://www.pinkjuice.com/ruby/
        • Chris Lilley
          ... Existing legacy HTML browsers that are reasonably modern often have an XML parser as well as the undocumented artifical intelligence machine used to parse
          Message 4 of 6 , Oct 5, 2001
          View Source
          • 0 Attachment
            Tobias Reif wrote:
            >
            > Chris,
            >
            > > Tahts because this page does not trigger the xml path but triggers the
            > > legacy HTML path.
            >
            > ?

            Existing legacy HTML browsers that are reasonably modern often have an
            XML parser as well as the undocumented artifical intelligence machine
            used to parse HTML pages. Usually, they only use the xml parser after
            sniffing the content and making some guess that it is in fact XML.

            >
            > > Its good that you added the embed element to the content model (though
            > > you added it to inline, I would have added it to the content of block)
            >
            > I had added it to both:
            > <!ENTITY % inline "embed | a | %special; | %fontstyle; | %phrase; |
            > %inline.forms;">
            > <!ENTITY % block "embed | p | %heading; | div | %lists; | %blocktext; |
            > fieldset | table">
            >
            > > but those entities are not allowed in the internal DTD subset.
            >
            > That's what I thought, but XML-Spy didn't complain.

            Did you report this bug to them? What version are you using - 3.5 or 4?

            > > In fact, I think that a new driver DTD which has those declarations and
            > > then imports the XHTML 1.1 dtd is the way to go. So you just have a
            > > different doctype...
            >
            > I have to admit, I did a quick hack and tweaked the XHTML DTD.
            > This
            > http://www.pinkjuice.com/temp/SVG/embed.html
            > is XHTML extended for bugwards compatibility, with the embed element.
            >
            > I should work @ least in in IE5.5+, NN6+, and NN4.7+
            >
            > According to XML Spy, it's valid in respect to
            > http://www.pinkjuice.com/temp/SVG/buggy_XHTML.dtd
            >
            > Any bugs in my buggy_XHTML? ;)

            Looks good to me. However, what I meant by a driver DTD is one that
            declares the stuff for embed and then imports the XHTML DTD by
            reference.

            --
            Chris
          • Tobias Reif
            Chris, ... 3.5; does 4.0 complain (fixed this bug)? ... I know; that would be much more elegant. That s why I wrote I did a quick hack and tweaked the XHTML
            Message 5 of 6 , Oct 5, 2001
            View Source
            • 0 Attachment
              Chris,


              >> > but those entities are not allowed in the internal DTD subset.
              >>
              >>That's what I thought, but XML-Spy didn't complain.
              >>
              >
              > Did you report this bug to them? What version are you using - 3.5 or 4?


              3.5; does 4.0 complain (fixed this bug)?

              >> http://www.pinkjuice.com/temp/SVG/buggy_XHTML.dtd


              > Looks good to me. However, what I meant by a driver DTD is one that
              > declares the stuff for embed and then imports the XHTML DTD by
              > reference.


              I know; that would be much more elegant.
              That's why I wrote "I did a quick hack and tweaked the XHTML DTD."

              Bugward compatibility hacks are more fun than I thought ;)

              Tobi

              --
              Tobias Reif
              http://www.pinkjuice.com/myDigitalProfile.xhtml

              go_to('www.ruby-lang.org').get(ruby).play.create.have_fun
              http://www.pinkjuice.com/ruby/
            • Tobias Reif
              - http://www.pinkjuice.com/temp/SVG/buggy_XHTML.dtd + http://www.pinkjuice.com/SVG/buggy_XHTML.dtd
              Message 6 of 6 , Oct 5, 2001
              View Source
              • 0 Attachment
              Your message has been successfully submitted and would be delivered to recipients shortly.