Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Re: Why Parsing Error for Link href not found in XHTML

Reply
Thread Tools

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

 
 
Harlan Messinger
Guest
Posts: n/a
 
      12-18-2008
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 />.
 
Reply With Quote
 
 
 
 
Seni Seven
Guest
Posts: n/a
 
      12-18-2008
Harlan Messinger <(E-Mail Removed)> 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?
 
Reply With Quote
 
 
 
 
Bergamot
Guest
Posts: n/a
 
      12-18-2008

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
 
Reply With Quote
 
Harlan Messinger
Guest
Posts: n/a
 
      12-18-2008
Seni Seven wrote:
> Harlan Messinger <(E-Mail Removed)> 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.
 
Reply With Quote
 
Seni Seven
Guest
Posts: n/a
 
      12-18-2008
Harlan Messinger <(E-Mail Removed)> wrote in alt.html:

> Seni Seven wrote:
>> Harlan Messinger <(E-Mail Removed)> 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?
 
Reply With Quote
 
Seni Seven
Guest
Posts: n/a
 
      12-18-2008
Bergamot <(E-Mail Removed)> 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:(E-Mail Removed)> 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.

 
Reply With Quote
 
Harlan Messinger
Guest
Posts: n/a
 
      12-18-2008
Seni Seven wrote:
> Harlan Messinger <(E-Mail Removed)> wrote in alt.html:
>
>> Seni Seven wrote:
>>> Harlan Messinger <(E-Mail Removed)> 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.
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      12-18-2008
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/

 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      12-18-2008
On 18 Dec 2008, Seni Seven <(E-Mail Removed)> 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/
 
Reply With Quote
 
Adrienne Boswell
Guest
Posts: n/a
 
      12-19-2008
Gazing into my crystal ball I observed Seni Seven
<(E-Mail Removed)> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Why Parsing Error for Link href not found in XHTML Bergamot HTML 5 12-18-2008 09:09 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
href="javascript:func()" vs href="#" onclick="javascript:func()" CRON HTML 24 06-20-2006 08:05 PM
parse URL (href) from xhtml, xhtml -> text, for data hawat.thufir@gmail.com XML 7 02-08-2006 07:39 PM
Problem: Setting MSIE iframe innerHTML change relative href/src to absolute href/src Soren Vejrum Javascript 4 07-05-2003 01:47 PM



Advertisments