XHTML validation problem with vml namespace

Discussion in 'HTML' started by Greg N., Mar 23, 2007.

  1. Greg N.

    Greg N. Guest

    I'm incorporating GoogleMaps in one of my pages
    http://hothaus.de/greg-tour-2006/route.htm
    This requires XHTML to work properly on IE. Also, it requires an <html>
    tag like this:

    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:v="urn:schemas-microsoft-com:vml">

    I'm not quite sure about the syntax of this, but I have copied this from
    Google's boilerplate code. Anyway, it's required, and the page works.
    That HTML tag does not validate, though. The error message says:

    "Error Line 4 column 51: there is no attribute "xmlns:v"."

    Can I do anything about it? Should I ignore it?

    --
    Gregor mit dem Motorrad auf Reisen
    http://hothaus.de/greg-tour/
     
    Greg N., Mar 23, 2007
    #1
    1. Advertising

  2. Greg N.

    cwdjrxyz Guest

    On Mar 23, 2:58 pm, "Greg N." <> wrote:
    > I'm incorporating GoogleMaps in one of my pageshttp://hothaus.de/greg-tour-2006/route.htm
    > This requires XHTML to work properly on IE. Also, it requires an <html>
    > tag like this:
    >
    > <html xmlns="http://www.w3.org/1999/xhtml"
    > xmlns:v="urn:schemas-microsoft-com:vml">


    Your page is being served as text/html and not with the correct mime
    type for xhtml which is application/xhtml+xml or application/xml. If
    you had served the page properly as xhtml, it could not be viewed by
    any IE browser, including IE6 and IE7. IE does not support correctly
    served xhtml, period. If you do not serve proper xhtml, then you would
    be better off serving html 4.01, since use of xhtml code for a page
    that is just served as text/html serves no useful purpose.
    ,

    >
    > I'm not quite sure about the syntax of this, but I have copied this from
    > Google's boilerplate code. Anyway, it's required, and the page works.
    > That HTML tag does not validate, though. The error message says:
    >
    > "Error Line 4 column 51: there is no attribute "xmlns:v"."
    >
    > Can I do anything about it? Should I ignore it?
    >
    > --
    > Gregor mit dem Motorrad auf Reisenhttp://hothaus.de/greg-tour/
     
    cwdjrxyz, Mar 24, 2007
    #2
    1. Advertising

  3. Greg N.

    Greg N. Guest

    cwdjrxyz wrote:
    > ... you would be better off
    > serving html 4.01, since use of xhtml code for a page
    > that is just served as text/html serves no useful purpose.


    I've heard that argument frequently, but my tests suggest this is the
    only way to make Google Maps work on IE. Whether you consider that a
    useful purpose is up to your taste :)

    Thanks anyway. I conclude there is no other way (right?), and I have to
    live with that validation error.

    --
    Gregor mit dem Motorrad auf Reisen
    http://hothaus.de/greg-tour/
     
    Greg N., Mar 24, 2007
    #3
  4. Greg N.

    dorayme Guest

    In article <eu1bgb$5uv$>,
    "Greg N." <> wrote:

    > I'm incorporating GoogleMaps in one of my pages
    > http://hothaus.de/greg-tour-2006/route.htm


    The dynamic map works well in Safari but not in FF on Mac. In
    iCab there is not even the static jpg, and iCab mentions:

    JavaScript Error:"load": Invalid reference
    (function/object/variable not defined?)
    http://hothaus.de/greg-tour-2006/route2006.js
    JavaScript Error:"ï": Invalid character

    I don't know if any of this is useful to you?

    I like the use you make of the map and if I could be convinced of
    its cross browser solidity, I would be greatly interested in
    doing similar for one or two sites under my control. Not at all
    keen on using anything but 4.01 so your remarks re xhtml being
    needed in this case are a bit of a worry.

    --
    dorayme
     
    dorayme, Mar 25, 2007
    #4
  5. Greg N.

    BootNic Guest

    > Greg N. <> wrote:
    > news: eu1bgb$5uv$
    > I'm incorporating GoogleMaps in one of my pages
    > http://hothaus.de/greg-tour-2006/route.htm
    > This requires XHTML to work properly on IE. Also, it requires an
    > <html> tag like this:
    >
    > <html xmlns="http://www.w3.org/1999/xhtml"
    > xmlns:v="urn:schemas-microsoft-com:vml">
    >
    > I'm not quite sure about the syntax of this, but I have copied this
    > from Google's boilerplate code. Anyway, it's required, and the page
    > works. That HTML tag does not validate, though. The error message
    > says:
    >
    > "Error Line 4 column 51: there is no attribute "xmlns:v"."
    >
    > Can I do anything about it? Should I ignore it?


    Conditional comments may pacify a validity check.

    <!--[if IE]>
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v=
    "urn:schemas-microsoft-com:vml">
    <![endif]-->
    <!--[if !IE]> <-->
    <html xmlns="http://www.w3.org/1999/xhtml">
    <!--> <![endif]-->


    --
    BootNic Sunday, March 25, 2007 1:05 AM

    Good habits result from resisting temptation.
    *Ancient Proverb*
     
    BootNic, Mar 25, 2007
    #5
  6. Greg N.

    Greg N. Guest

    dorayme wrote about google maps at
    http://hothaus.de/greg-tour-2006/route.htm

    > ... iCab mentions:
    >
    > JavaScript Error:"load": Invalid reference
    > (function/object/variable not defined?)
    > http://hothaus.de/greg-tour-2006/route2006.js
    > JavaScript Error:"ï": Invalid character
    >
    > I don't know if any of this is useful to you?


    Thanks! I have a vague idea what caused this, and I tried to fix it.
    May I ask you to give it another try with iCab?

    --
    Gregor mit dem Motorrad auf Reisen
    http://hothaus.de/greg-tour/
     
    Greg N., Mar 25, 2007
    #6
  7. Greg N.

    dorayme Guest

    In article <eu6mi0$rlv$>,
    "Greg N." <> wrote:

    > dorayme wrote about google maps at
    > http://hothaus.de/greg-tour-2006/route.htm
    >
    > > ... iCab mentions:
    > >
    > > JavaScript Error:"load": Invalid reference
    > > (function/object/variable not defined?)
    > > http://hothaus.de/greg-tour-2006/route2006.js
    > > JavaScript Error:"ï": Invalid character
    > >
    > > I don't know if any of this is useful to you?

    >
    > Thanks! I have a vague idea what caused this, and I tried to fix it.
    > May I ask you to give it another try with iCab?


    No show in iCab still. This time the whole "diagnosis" is:

    http://hothaus.de/greg-tour-2006/route.htm
    HTML error (5/84): The attribute ³XMLNS:V² in tag <HTML> is not
    allowed.
    http://hothaus.de/greg-tour-2006/route2006.js
    JavaScript Error:"ï": Invalid character

    --
    dorayme
     
    dorayme, Mar 25, 2007
    #7
  8. Greg N.

    Andy Dingley Guest

    On 23 Mar, 20:58, "Greg N." <> wrote:
    > I'm incorporating GoogleMaps in one of my pageshttp://hothaus.de/greg-tour-2006/route.htm
    > This requires XHTML to work properly on IE. Also, it requires an <html>
    > tag like this:
    >
    > <html xmlns="http://www.w3.org/1999/xhtml"
    > xmlns:v="urn:schemas-microsoft-com:vml">


    It can't "require XHTML to work properly on IE" as IE just doesn't
    work properly with XHTML anyway. I'm also puzzled as to just why it
    requires the vml namespace to be declared. This content looks like
    SVG, not VML ! It doesn't appear to make any use of it.

    In practical terms you just can't do this, exactly as described. It's
    easy to describe what you need to do to do it perfectly (including
    serving it under an XHTML-as-XML content type), but it will then fail
    under IE. As it obviously "works", then there's clearly some leeway
    in just how valid you need to be to make things work.

    I suggest simply ditching the vml namespace. It's not necessary to use
    it -- even if Google did require and impose it, it would be possible
    for a pure-XML approach to add it to child elements of the page, not
    necessarily the <head>. I even doubt it's appropriate to use this, let
    alone required. Obviously you'd need to test this on a few browsers.

    You might even get this page into plain old HTML 4.01 Strict, rather
    than fiddling about with pseudo-XHTML under Appendix C.

    I strongly suspect that practical support of Google's embedded maps
    and the SVG features they use will work just as well embedded into
    HTML as they do in XHTML with problematic VML namespaces dotted around
    the place.
     
    Andy Dingley, Mar 26, 2007
    #8
  9. Greg N.

    Greg N. Guest

    Andy Dingley wrote:

    > It can't "require XHTML...
    > I'm also puzzled...
    > I even doubt...
    > You might even...
    > I strongly suspect...


    Well; I admit I don't understand much of what you said here.

    But I've tested it. I've tested it with plain HTML 4 strict. It works
    under FF, but not IE. With the XHTML and VML incantations as suggested
    by Google, it works under IE, too.

    --
    Gregor mit dem Motorrad auf Reisen
    http://hothaus.de/greg-tour/
     
    Greg N., Mar 26, 2007
    #9
  10. Greg N.

    dorayme Guest

    In article <eu8vau$uhg$>,
    "Greg N." <> wrote:

    > Andy Dingley wrote:
    >
    > > It can't "require XHTML...
    > > I'm also puzzled...
    > > I even doubt...
    > > You might even...
    > > I strongly suspect...

    >
    > Well; I admit I don't understand much of what you said here.
    >
    > But I've tested it. I've tested it with plain HTML 4 strict. It works
    > under FF, but not IE. With the XHTML and VML incantations as suggested
    > by Google, it works under IE, too.


    How about it AD, making a demo for 4.01 Strict and it working
    reasonably well all over the show? Trust me, there will be many
    eyes and ears ready to gobble up and use the result. If how to do
    a google map well in 4.01 is handed on a platter, well then, who
    would not be interested?

    (One of the things I liked about Greg N's map is that I was able
    to stray in concentration from his motorbike and trips and see
    into the past. For example, the giant gum tree that was recently
    cut down next door to me.[1]. This led to me suggesting to the
    next door neighbour that he tease the team that cut it down by
    complaining that they failed completely in spite of appearances.)

    [1] The satellite pics are nowhere near daily updated

    --
    dorayme
     
    dorayme, Mar 26, 2007
    #10
  11. Greg N.

    Andy Dingley Guest

    On Mon, 26 Mar 2007 19:19:24 +0200, "Greg N." <>
    wrote:

    >With the XHTML and VML incantations as suggested
    >by Google, it works under IE, too.


    VML is IE-only (when I last looked, years ago) SVG is standards based
    and cross browser.

    I suspect that Google's client-side JavaScript sniffs browser type and
    serves one or the other accordingly. With the poor XML compliance of
    older M$oft tools, it might even be essential to put it on the root
    element.

    If it's important to have this namespace, and it doesn't break anythign
    (spare unrecognised attributes don't) then I'd leave it in place and
    stop worrying about perfect validity.
     
    Andy Dingley, Mar 26, 2007
    #11
    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. Jason

    VML Anti-aliasing woes

    Jason, Sep 26, 2003, in forum: XML
    Replies:
    0
    Views:
    781
    Jason
    Sep 26, 2003
  2. Prashant

    XML and VML Job

    Prashant, Jan 9, 2004, in forum: XML
    Replies:
    0
    Views:
    415
    Prashant
    Jan 9, 2004
  3. Macroman

    VML - Help

    Macroman, Feb 16, 2004, in forum: XML
    Replies:
    0
    Views:
    411
    Macroman
    Feb 16, 2004
  4. Robert

    Adding namespace for VML

    Robert, Oct 16, 2007, in forum: Javascript
    Replies:
    5
    Views:
    264
    David Mark
    Oct 17, 2007
  5. Walton
    Replies:
    0
    Views:
    662
    Walton
    Feb 15, 2008
Loading...

Share This Page