Re: Why Parsing Error for Link href not found in XHTML

Discussion in 'HTML' started by Harlan Messinger, Dec 18, 2008.

  1. Seni Seven wrote:
    > With HTML, I can include several <link> elements to a stylesheet of the
    > same name, in a cover-my-bases sort of way.
    >
    > For instance, I like to keep a library of CSS and JS files in a central
    > location on my PC where I develop the pages, such as "c:\style" or
    > "c:\include", respectively.
    >
    > Then on the public server, I put them in the directories 'style' or
    > 'include' off the root directory.
    >
    > So I might include in the HTML document this:
    >
    > <link href="/style/mscope.css" type="text/css" rel="stylesheet">
    > <link href="file://c|/style/mscope.css" type="text/css" rel="stylesheet">
    >
    > On the development system, the href with "file:" protocol would be caught,
    > and on the public server the first link would be found. Clearly unfound
    > files would be ignored.
    >
    > But on Firefox browser, apparently unfound links or any other files for
    > that matter are reported as "xml parsing errors". Is that behavior
    > specified in the XHTML recommendation?


    If Firefox is treating your page as XML, then your link tags are wrong
    because they aren't terminated with />.
    Harlan Messinger, Dec 18, 2008
    #1
    1. Advertising

  2. Harlan Messinger

    Seni Seven Guest

    Harlan Messinger <> wrote in alt.html:

    > Seni Seven wrote:
    >> With HTML, I can include several <link> elements to a stylesheet of
    >> the same name, in a cover-my-bases sort of way.
    >>
    >> For instance, I like to keep a library of CSS and JS files in a
    >> central location on my PC where I develop the pages, such as
    >> "c:\style" or "c:\include", respectively.
    >>
    >> Then on the public server, I put them in the directories 'style' or
    >> 'include' off the root directory.
    >>
    >> So I might include in the HTML document this:
    >>
    >> <link href="/style/mscope.css" type="text/css" rel="stylesheet">
    >> <link href="file://c|/style/mscope.css" type="text/css"
    >> rel="stylesheet">
    >>
    >> On the development system, the href with "file:" protocol would be
    >> caught, and on the public server the first link would be found.
    >> Clearly unfound files would be ignored.
    >>
    >> But on Firefox browser, apparently unfound links or any other files
    >> for that matter are reported as "xml parsing errors". Is that
    >> behavior specified in the XHTML recommendation?

    >
    > If Firefox is treating your page as XML, then your link tags are wrong
    > because they aren't terminated with />.


    That's not the case. I did not show the <link> tag above with those
    because I was presenting HTML, not XHTML. The parsing error is precisely
    because the resource specified by 'href' attribute value is non-existent.
    This is NOT a problem in HTML---ONLY a problem in XHTML.

    The point here is that XHTML is showing an inflexibility and rigidity it
    probably need not really have.

    The points about web servers being "slowed" by missing resources---which
    is not true, since web servers are slowed actually by fetching and
    transmitting existing resources in fact----are not a reason not to be able
    to have absolute or relative paths that might be present on a development
    system and on the public server <news:b2a34$494a5cfb$40cba7a8$14483
    @NAXS.COM>,

    Here is the difference between HTML and XHTML:

    HTML: As much as possible is done to render a page, although if you are
    very loose with the recommendations regarding use of elements and
    attributes in structure and presentation, you are likely to see vastly
    different results on http clients.

    XHTML: We absolutely guarantee that if you have a different look to your
    web page on different http clients, it won't be because you failed to
    adhere the demanding rigidity and inflexibility and utter verbosity we
    imposed upon you in containing your content with completely tedious
    markup. Oh, and in fact, Microsoft considers strictly implemented XHTML
    so annoying, its browser won't render us at all!

    So why am I trying mightily to adhere to a discipline that seems to have
    few benefits and consumes too much time?
    Seni Seven, Dec 18, 2008
    #2
    1. Advertising

  3. Harlan Messinger

    Bergamot Guest

    Seni Seven wrote:
    >>>
    >>> <link href="/style/mscope.css" type="text/css" rel="stylesheet">
    >>> <link href="file://c|/style/mscope.css" type="text/css"
    >>> rel="stylesheet">
    >>>
    >>> But on Firefox browser, apparently unfound links or any other files
    >>> for that matter are reported as "xml parsing errors".

    >
    > The parsing error is precisely
    > because the resource specified by 'href' attribute value is non-existent.


    I doubt that. Why don't you post a URL so we can see for ourselves?

    > XHTML: We absolutely guarantee that if you have a different look to your
    > web page on different http clients, it won't be because you failed to
    > adhere the demanding rigidity and inflexibility and utter verbosity we
    > imposed upon you in containing your content with completely tedious
    > markup.
    >
    > So why am I trying mightily to adhere to a discipline that seems to have
    > few benefits and consumes too much time?


    Beats me. Why don't you stick to HTML? Most of us do.

    --
    Berg
    Bergamot, Dec 18, 2008
    #3
  4. Seni Seven wrote:
    > Harlan Messinger <> wrote in alt.html:
    >
    >> Seni Seven wrote:
    >>> With HTML, I can include several <link> elements to a stylesheet of
    >>> the same name, in a cover-my-bases sort of way.
    >>>
    >>> For instance, I like to keep a library of CSS and JS files in a
    >>> central location on my PC where I develop the pages, such as
    >>> "c:\style" or "c:\include", respectively.
    >>>
    >>> Then on the public server, I put them in the directories 'style' or
    >>> 'include' off the root directory.
    >>>
    >>> So I might include in the HTML document this:
    >>>
    >>> <link href="/style/mscope.css" type="text/css" rel="stylesheet">
    >>> <link href="file://c|/style/mscope.css" type="text/css"
    >>> rel="stylesheet">
    >>>
    >>> On the development system, the href with "file:" protocol would be
    >>> caught, and on the public server the first link would be found.
    >>> Clearly unfound files would be ignored.
    >>>
    >>> But on Firefox browser, apparently unfound links or any other files
    >>> for that matter are reported as "xml parsing errors". Is that
    >>> behavior specified in the XHTML recommendation?

    >> If Firefox is treating your page as XML, then your link tags are wrong
    >> because they aren't terminated with />.

    >
    > That's not the case. I did not show the <link> tag above with those
    > because I was presenting HTML, not XHTML. The parsing error is precisely
    > because the resource specified by 'href' attribute value is non-existent.
    > This is NOT a problem in HTML---ONLY a problem in XHTML.


    It is the case that if you are presenting your page as XHTML, then the
    LINK tags must be terminated. In HTML LINK elements aren't terminated,
    so, yes, not terminating your LINK elements isn't a problem in HTML,
    only in XHTML.

    > The point here is that XHTML is showing an inflexibility and rigidity it
    > probably need not really have.


    The parser doesn't check whether the value of an HREF attribute is a
    valid URL or not, let alone whether the resource it points to exists, so
    the value of the HREF attribute is almost certainly not the source of
    your problem.
    Harlan Messinger, Dec 18, 2008
    #4
  5. Harlan Messinger

    Seni Seven Guest

    Harlan Messinger <> wrote in alt.html:

    > Seni Seven wrote:
    >> Harlan Messinger <> wrote in
    >> alt.html:
    >>
    >>> Seni Seven wrote:
    >>>> With HTML, I can include several <link> elements to a stylesheet of
    >>>> the same name, in a cover-my-bases sort of way.
    >>>>
    >>>> For instance, I like to keep a library of CSS and JS files in a
    >>>> central location on my PC where I develop the pages, such as
    >>>> "c:\style" or "c:\include", respectively.
    >>>>
    >>>> Then on the public server, I put them in the directories 'style' or
    >>>> 'include' off the root directory.
    >>>>
    >>>> So I might include in the HTML document this:
    >>>>
    >>>> <link href="/style/mscope.css" type="text/css" rel="stylesheet">
    >>>> <link href="file://c|/style/mscope.css" type="text/css"
    >>>> rel="stylesheet">
    >>>>
    >>>> On the development system, the href with "file:" protocol would be
    >>>> caught, and on the public server the first link would be found.
    >>>> Clearly unfound files would be ignored.
    >>>>
    >>>> But on Firefox browser, apparently unfound links or any other files
    >>>> for that matter are reported as "xml parsing errors". Is that
    >>>> behavior specified in the XHTML recommendation?
    >>> If Firefox is treating your page as XML, then your link tags are
    >>> wrong because they aren't terminated with />.

    >>
    >> That's not the case. I did not show the <link> tag above with those
    >> because I was presenting HTML, not XHTML. The parsing error is
    >> precisely because the resource specified by 'href' attribute value is
    >> non-existent. This is NOT a problem in HTML---ONLY a problem in
    >> XHTML.

    >
    > It is the case that if you are presenting your page as XHTML, then the
    > LINK tags must be terminated. In HTML LINK elements aren't terminated,
    > so, yes, not terminating your LINK elements isn't a problem in HTML,
    > only in XHTML.
    >
    >> The point here is that XHTML is showing an inflexibility and rigidity
    >> it probably need not really have.

    >
    > The parser doesn't check whether the value of an HREF attribute is a
    > valid URL or not, let alone whether the resource it points to exists,
    > so the value of the HREF attribute is almost certainly not the source
    > of your problem.


    Okay, here is what Firefox version 3 is giving as the error:


    XML Parsing Error:
    Location: http://proteomics.awardspace.info/Practice3.xhtml
    Line Number 14, Column 77:<link href="file:///c|/style/mscope.css"
    type="text/css" rel="stylesheet" />
    ---------------------------------------------------------------------------
    -^

    Note that mscope.css is located in '/style' on the public server.


    [Note that the Xnews nntp client I use does not permit lines longer than 75
    characters, it seems].

    And here is the URL:

    http://proteomics.awardspace.info/Practice3.xhtml

    When I do it on my development system on my PC, here is the error that FF3
    is giving:

    XML Parsing Error:
    Location: file:///D:/The%20Lab/F%20I%20S%20H/Practice3.xhtml
    Line Number 13, Column 67:<link href="/style/mscope.css" type="text/css"
    rel="stylesheet" />
    ------------------------------------------------------------------^


    Note that mscope.css is located at 'c:\style' on my PC.


    What do you conclude?
    Seni Seven, Dec 18, 2008
    #5
  6. Harlan Messinger

    Seni Seven Guest

    Bergamot <> wrote in alt.html:

    >
    > Seni Seven wrote:
    >>>>
    >>>> <link href="/style/mscope.css" type="text/css" rel="stylesheet">
    >>>> <link href="file://c|/style/mscope.css" type="text/css"
    >>>> rel="stylesheet">
    >>>>
    >>>> But on Firefox browser, apparently unfound links or any other files
    >>>> for that matter are reported as "xml parsing errors".

    >>
    >> The parsing error is precisely
    >> because the resource specified by 'href' attribute value is
    >> non-existent.

    >
    > I doubt that. Why don't you post a URL so we can see for ourselves?



    The messsage <news:> contains the URL and
    a description of the different error messages I see on the development
    system and the public server.


    >
    >> XHTML: We absolutely guarantee that if you have a different look to
    >> your web page on different http clients, it won't be because you
    >> failed to adhere the demanding rigidity and inflexibility and utter
    >> verbosity we imposed upon you in containing your content with
    >> completely tedious markup.
    >>
    >> So why am I trying mightily to adhere to a discipline that seems to
    >> have few benefits and consumes too much time?

    >
    > Beats me. Why don't you stick to HTML? Most of us do.


    Because there are a few cases where developers do the markup in HTML and
    do not get the results they want and can't tell what is going on, and if
    they do the markup in XHMTL, they are pointed to the problem quite
    quickly.
    Seni Seven, Dec 18, 2008
    #6
  7. Seni Seven wrote:
    > Harlan Messinger <> wrote in alt.html:
    >
    >> Seni Seven wrote:
    >>> Harlan Messinger <> wrote in
    >>> alt.html:
    >>>
    >>>> Seni Seven wrote:
    >>>>> With HTML, I can include several <link> elements to a stylesheet of
    >>>>> the same name, in a cover-my-bases sort of way.
    >>>>>
    >>>>> For instance, I like to keep a library of CSS and JS files in a
    >>>>> central location on my PC where I develop the pages, such as
    >>>>> "c:\style" or "c:\include", respectively.
    >>>>>
    >>>>> Then on the public server, I put them in the directories 'style' or
    >>>>> 'include' off the root directory.
    >>>>>
    >>>>> So I might include in the HTML document this:
    >>>>>
    >>>>> <link href="/style/mscope.css" type="text/css" rel="stylesheet">
    >>>>> <link href="file://c|/style/mscope.css" type="text/css"
    >>>>> rel="stylesheet">
    >>>>>
    >>>>> On the development system, the href with "file:" protocol would be
    >>>>> caught, and on the public server the first link would be found.
    >>>>> Clearly unfound files would be ignored.
    >>>>>
    >>>>> But on Firefox browser, apparently unfound links or any other files
    >>>>> for that matter are reported as "xml parsing errors". Is that
    >>>>> behavior specified in the XHTML recommendation?
    >>>> If Firefox is treating your page as XML, then your link tags are
    >>>> wrong because they aren't terminated with />.
    >>> That's not the case. I did not show the <link> tag above with those
    >>> because I was presenting HTML, not XHTML. The parsing error is
    >>> precisely because the resource specified by 'href' attribute value is
    >>> non-existent. This is NOT a problem in HTML---ONLY a problem in
    >>> XHTML.

    >> It is the case that if you are presenting your page as XHTML, then the
    >> LINK tags must be terminated. In HTML LINK elements aren't terminated,
    >> so, yes, not terminating your LINK elements isn't a problem in HTML,
    >> only in XHTML.
    >>
    >>> The point here is that XHTML is showing an inflexibility and rigidity
    >>> it probably need not really have.

    >> The parser doesn't check whether the value of an HREF attribute is a
    >> valid URL or not, let alone whether the resource it points to exists,
    >> so the value of the HREF attribute is almost certainly not the source
    >> of your problem.

    >
    > Okay, here is what Firefox version 3 is giving as the error:
    >
    >
    > XML Parsing Error:
    > Location: http://proteomics.awardspace.info/Practice3.xhtml
    > Line Number 14, Column 77:<link href="file:///c|/style/mscope.css"
    > type="text/css" rel="stylesheet" />
    > ---------------------------------------------------------------------------
    > -^


    So you do have a terminating slash.

    >
    > Note that mscope.css is located in '/style' on the public server.
    >
    >
    > [Note that the Xnews nntp client I use does not permit lines longer than 75
    > characters, it seems].
    >
    > And here is the URL:
    >
    > http://proteomics.awardspace.info/Practice3.xhtml
    >
    > When I do it on my development system on my PC, here is the error that FF3
    > is giving:
    >
    > XML Parsing Error:
    > Location: file:///D:/The%20Lab/F%20I%20S%20H/Practice3.xhtml
    > Line Number 13, Column 67:<link href="/style/mscope.css" type="text/css"
    > rel="stylesheet" />
    > ------------------------------------------------------------------^
    >
    >
    > Note that mscope.css is located at 'c:\style' on my PC.
    >
    >
    > What do you conclude?


    It looks like I was mistaken. I changed the URL to an ordinary relative
    URL and didn't get the same error. Sorry.
    Harlan Messinger, Dec 18, 2008
    #7
  8. Seni Seven wrote:

    > And here is the URL:
    >
    > http://proteomics.awardspace.info/Practice3.xhtml


    You would have saved everyone's time by posting the URL in your initial
    message.

    You have encountered a bug in Firefox. The bug can be isolated into the
    following XML document:

    <html xmlns="http://www.w3.org/1999/xhtml">
    <link href="/foo" rel="stylesheet" />
    </html>

    Firefox probably gets confused with the slash even though it is inside a
    quoted string.

    The bug is probably related to attempts at mixing generic XML processing
    with XHTML-aware processing. Submit a bug report to Firefox-related
    development forums if this really matters to you.

    Using XHTML just because it's XML is fairly pointless when even modern
    "standards-conforming" web browsers can't handle a trivial XML document and
    the most common browser doesn't eat XHTML at all.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Dec 18, 2008
    #8
  9. Harlan Messinger

    Neredbojias Guest

    On 18 Dec 2008, Seni Seven <> wrote:

    > So why am I trying mightily to adhere to a discipline that seems to
    > have few benefits and consumes too much time?


    If by that you mean using xhtml over html, you're suspicion is correct,
    and don't. Xhtml (as it is today) is dead; most people just don't know
    it yet. Stick to html strict and you'll be a happy camper for at least
    a decade.

    --
    Neredbojias
    http://www.neredbojias.org/
    http://www.neredbojias.net/
    Neredbojias, Dec 18, 2008
    #9
  10. Gazing into my crystal ball I observed Seni Seven
    <> writing in news:Xns9B78C98C730D6SSca@
    207.115.33.102:

    >> Beats me. Why don't you stick to HTML? Most of us do.

    >
    > Because there are a few cases where developers do the markup in HTML

    and
    > do not get the results they want and can't tell what is going on, and

    if
    > they do the markup in XHMTL, they are pointed to the problem quite
    > quickly.
    >


    Yes, where XHTML is served as XHTML and the XML is not well formed you
    will get an error. With XHTML served as txt/html you will not.

    The same rule applies for HTML and XHTML - if there is a presentation
    issue, validate markup first, then validate CSS.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, Dec 19, 2008
    #10
  11. Harlan Messinger

    Chaddy2222 Guest

    On Dec 20, 1:16 am, Adrienne Boswell <> wrote:
    > Gazing into my crystal ball I observed Seni Seven
    > <> writing in news:Xns9B78C98C730D6SSca@
    > 207.115.33.102:
    >
    >
    >
    > >> Beats me. Why don't you stick to HTML? Most of us do.

    >
    > > Because there are a few cases where developers do the markup in HTML

    > and
    > > do not get the results they want and can't tell what is going on, and

    > if
    > > they do the markup in XHMTL, they are pointed to the problem quite
    > > quickly.

    >
    > Yes, where XHTML is served as XHTML and the XML is not well formed you
    > will get an error. With XHTML served as txt/html you will not.
    >
    > The same rule applies for HTML and XHTML - if there is a presentation
    > issue, validate markup first, then validate CSS.
    >

    I did notice that on your website though, that you mention that you do
    XHTML. I started off doing that, but have since reverted back to
    useing HTML 4.01 Strict, mainly because their is no benifit for useing
    XHTML as Internet Explorer does not support it. Mind you I am already
    thinking about dropping support for IE7 is it is hopeless, it is just
    IE6 with one or two add-ons.
    --
    Regards Chad. http://freewebdesignonline.org
    Chaddy2222, Dec 21, 2008
    #11
  12. Harlan Messinger

    David Mark Guest

    On Dec 21, 8:07 am, Chaddy2222 <spamlovermailbox-
    > wrote:
    > On Dec 20, 1:16 am, Adrienne Boswell <> wrote:
    >
    > > Gazing into my crystal ball I observed Seni Seven
    > > <> writing in news:Xns9B78C98C730D6SSca@
    > > 207.115.33.102:

    >
    > > >> Beats me. Why don't you stick to HTML? Most of us do.

    >
    > > > Because there are a few cases where developers do the markup in HTML

    > > and
    > > > do not get the results they want and can't tell what is going on, and

    > > if
    > > > they do the markup in XHMTL, they are pointed to the problem quite
    > > > quickly.

    >
    > > Yes, where XHTML is served as XHTML and the XML is not well formed you
    > > will get an error. With XHTML served as txt/html you will not.

    >
    > > The same rule applies for HTML and XHTML - if there is a presentation
    > > issue, validate markup first, then validate CSS.

    >
    > I did notice that on your website though, that you mention that you do
    > XHTML. I started off doing that, but have since reverted back to
    > useing HTML 4.01 Strict, mainly because their is no benifit for useing
    > XHTML as Internet Explorer does not support it. Mind you I am already
    > thinking about dropping support for IE7 is it is hopeless, it is just
    > IE6 with one or two add-ons.


    Think again.

    [snip]
    David Mark, Dec 21, 2008
    #12
  13. David Mark wrote:
    > On Dec 21, 8:07 am, Chaddy2222 <spamlovermailbox-
    > > wrote:


    >> I did notice that on your website though, that you mention that you do
    >> XHTML. I started off doing that, but have since reverted back to
    >> useing HTML 4.01 Strict, mainly because their is no benifit for useing
    >> XHTML as Internet Explorer does not support it. Mind you I am already
    >> thinking about dropping support for IE7 is it is hopeless, it is just
    >> IE6 with one or two add-ons.

    >
    > Think again.


    If you mean because so many use IE you cannot ignore it, then I agree.
    But even though MS made many changes in IE7 it still is a bug ridden
    b*tch with respect to web design. Yes they fix many of IE6's
    shortcomings but also manage to introduce a slew of new ones! Gérard
    been taking the trouble to document them:

    http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/
    Bugs in MSIE 7 for Windows

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Dec 21, 2008
    #13
  14. Harlan Messinger

    Seni Seven Guest

    "Jonathan N. Little" <> wrote in alt.html:

    > David Mark wrote:
    >> On Dec 21, 8:07 am, Chaddy2222 <spamlovermailbox-
    >> > wrote:

    >
    >>> I did notice that on your website though, that you mention that you do
    >>> XHTML. I started off doing that, but have since reverted back to
    >>> useing HTML 4.01 Strict, mainly because their is no benifit for useing
    >>> XHTML as Internet Explorer does not support it. Mind you I am already
    >>> thinking about dropping support for IE7 is it is hopeless, it is just
    >>> IE6 with one or two add-ons.

    >>
    >> Think again.

    >
    > If you mean because so many use IE you cannot ignore it, then I agree.
    > But even though MS made many changes in IE7 it still is a bug ridden
    > b*tch with respect to web design.


    It is not really bug-ridden---"with respect to web design."

    Microsoft's failure to adhere to "standards"---that is, W3 (X)HTML
    recommendations---is quite intentional, inasmuch as its outright contempt
    for client-side scripting by trying to force everyone to knuckle under
    that garbage VBscript.

    > Yes they fix many of IE6's
    > shortcomings but also manage to introduce a slew of new ones! Gérard
    > been taking the trouble to document them:
    >
    > http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/
    > Bugs in MSIE 7 for Windows


    The quote at the top of this document says it all:

    "Until IE is reasonably standards-compliant you can expect no
    quarter from us. We've spent too much time designing web sites that
    will work for CSS and then work for IE. We've destroyed budgets,
    pissed off our bosses, irritated clients and made development more
    expensive because of your little (Rosemary's) baby."

    The intentional non-compliance to a standard is not really a "bug."

    Microsoft has always said to developers and the end-users, "you are either
    with us or against us. You decide. There is only room for ONE in this
    room."
    Seni Seven, Dec 22, 2008
    #14
    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. Replies:
    7
    Views:
    868
  2. CRON
    Replies:
    24
    Views:
    200,487
    Adrienne Boswell
    Jun 20, 2006
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,766
    Smokey Grindel
    Dec 2, 2006
  4. Bergamot
    Replies:
    5
    Views:
    977
    Jonathan N. Little
    Dec 18, 2008
  5. Soren Vejrum
    Replies:
    4
    Views:
    538
    Lasse Reichstein Nielsen
    Jul 5, 2003
Loading...

Share This Page