W3c Validation and Yahoo map URL

  • Thread starter news frontiernet.net
  • Start date
N

news frontiernet.net

Is anyone else having problems validating their documents that contain links
to mapping services like yahoo?

I am working on getting my documents to validate and one of the issues is
with the URL's to the yahoo mapping service. I am sure that the same
validation problems will exist with the other mapping services, since the
issue is with the VALIDATION of this with the W3C HTML validator.

This is the coding that I used in my HTML document for a yahoo map. The URL
came from a
Win 98 COPY/PASTE from the browser selection box when the map was created.
The process
does work for the visitor and does present that particular map. But, it does
NOT VALIDATE as
strict HTML on W3C.

Does anyone know how to do this an be VALID HTML strict code?

/////////////////////////////////
<A target="new"
HREF="http://maps.yahoo.com/maps_result?ed=GZSN7up_0TqvEgRaiERmhL7tjX0pEQKBi
w--
&csz=Worthington+MN+56187&country=us&new=1&name=&qty=">
////////////////////////////////////

Here are the errors that W3C validation of HTML strict found with this:
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Line 197, column 96: cannot generate system identifier for general entity
"csz"

....GZSN7up_0TqvEgRaiERmhL7tjX0pEQKBiw--&csz=Worthington+MN+56187&country=us
&new=

An entity reference was found in the document, but there is no reference by
that name defined.
Often this is caused by misspelling the reference name, unencoded
ampersands, or by leaving off
the trailing semicolon (;). The most common cause of this error is unencoded
ampersands in
URLs as described by the WDG in "Ampersands in URLs".

Entity references start with an ampersand (&) and end with a semicolon (;).
If you want to use a
literal ampersand in your document you must encode it as "&amp;" (even
inside URLs!). Be
careful to end entity references with a semicolon or your entity reference
may get interpreted in
connection with the following text. Also keep in mind that named entity
references are
case-sensitive; &Aelig; and &aelig; are different characters.

Note that in most documents, errors related to entity references will
trigger up to 5 separate
messages from the Validator. Usually these will all disappear when the
original problem is fixed.

?

Line 197, column 96: general entity "csz" not defined and no default entity

....GZSN7up_0TqvEgRaiERmhL7tjX0pEQKBiw--&csz=Worthington+MN+56187&country=us
&new=

This is usually a cascading error caused by a an undefined entity reference
or use of an unencoded
ampersand (&) in an URL or body text. See the previous message for further
details.

?

Line 197, column 99: reference to entity "csz" for which no system
identifier could be generated

....N7up_0TqvEgRaiERmhL7tjX0pEQKBiw--&csz=Worthington+MN+56187&country=us&new
=1&n

This is usually a cascading error caused by a an undefined entity reference
or use of an unencoded
ampersand (&) in an URL or body text. See the previous message for further
details.

?

Line 197, column 95: entity was defined here

....=GZSN7up_0TqvEgRaiERmhL7tjX0pEQKBiw--&csz=Worthington+MN+56187&country=us
&new

Line 197, column 121: cannot generate system identifier for general entity
"country"

....X0pEQKBiw--&csz=Worthington+MN+56187&country=us&new=1&name=&qty=">

?

Line 197, column 121: general entity "country" not defined and no default
entity

....X0pEQKBiw--&csz=Worthington+MN+56187&country=us&new=1&name=&qty=">

?

Line 197, column 128: reference to entity "country" for which no system
identifier could be
generated

....iw--&csz=Worthington+MN+56187&country=us&new=1&name=&qty=">

?

Line 197, column 120: entity was defined here

....jX0pEQKBiw--&csz=Worthington+MN+56187&country=us&new=1&name=&qty=">

Line 197, column 132: cannot generate system identifier for general entity
"new"

....&csz=Worthington+MN+56187&country=us&new=1&name=&qty=">

?

Line 197, column 132: general entity "new" not defined and no default entity

....&csz=Worthington+MN+56187&country=us&new=1&name=&qty=">

?

Line 197, column 135: reference to entity "new" for which no system
identifier could be generated

....z=Worthington+MN+56187&country=us&new=1&name=&qty=">

?

Line 197, column 131: entity was defined here

....-&csz=Worthington+MN+56187&country=us&new=1&name=&qty=">

Line 197, column 138: cannot generate system identifier for general entity
"name"

....orthington+MN+56187&country=us&new=1&name=&qty=">

?

Line 197, column 138: general entity "name" not defined and no default
entity

....orthington+MN+56187&country=us&new=1&name=&qty=">

?

Line 197, column 142: reference to entity "name" for which no system
identifier could be
generated

....ington+MN+56187&country=us&new=1&name=&qty=">

?

Line 197, column 137: entity was defined here

....Worthington+MN+56187&country=us&new=1&name=&qty=">

Line 197, column 144: cannot generate system identifier for general entity
"qty"

....gton+MN+56187&country=us&new=1&name=&qty=">

?

Line 197, column 144: general entity "qty" not defined and no default entity

....gton+MN+56187&country=us&new=1&name=&qty=">

?

Line 197, column 147: reference to entity "qty" for which no system
identifier could be generated

....n+MN+56187&country=us&new=1&name=&qty=">

?

Line 197, column 143: entity was defined here

....ngton+MN+56187&country=us&new=1&name=&qty=">
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
 
D

Dylan Parry

Engaging said:
...ngton+MN+56187&country=us&new=1&name=&qty=">

Using this last error as an example, the validator is just pointing out
that some browsers may have problems with using the character "&" in an
anchor element. You should instead replace it with "&amp;" so the above
becomes:

...ngton+MN+56187&amp;country=us&amp;new=1&amp;name=&amp;qty=">
 
S

Sam Hughes

Is anyone else having problems validating their documents that contain
links to mapping services like yahoo?

Does anyone know how to do this an be VALID HTML strict code?

Read the following:
 
S

Steve Pugh

news frontiernet.net said:
Does anyone know how to do this an be VALID HTML strict code?

<A target="new"
HREF="http://maps.yahoo.com/maps_result?ed=GZSN7up_0TqvEgRaiERmhL7tjX0pEQKBi
w--&csz=Worthington+MN+56187&country=us&new=1&name=&qty=">

Change that to the following and it will be valid HTML 4.01 Strict:

<A
HREF="http://maps.yahoo.com/maps_result?ed=GZSN7up_0TqvEgRaiERmhL7tjX0pEQKBi
w--&amp;csz=Worthington+MN+56187&amp;country=us&amp;new=1&amp;name=&amp;qty=">

cheers,
Steve
 
N

news frontiernet.net

I had assumed that changing the content of the URL in that way ( substitute
a code for the ampersand ) would make it not pass the correct information to
the mapping service and thus would not create the specified map for the
visitor.

I just created a sample web page with this coding and it does seem to find
the correct map.

Thank you!
 
T

Toby Inkster

news said:
I had assumed that changing the content of the URL in that way ( substitute
a code for the ampersand )

You're not changing the URL -- just how it's written in your HTML code.
 
N

news frontiernet.net

I can understand the use of codes, like you are suggesting, when unusual
characters are to be displayed to the visitor with their browser. I have
done that with the copyright symbol and one or two other symbols.

BUT, here the value is a URL that is NOT DISPLAYED to the visitor. It just
exists as the value in the HREF= parameter of a link to another document.

It seems like the value to the right of the HREF= should not be altered in
any way. I had assumed that this text string was used by some server based
software to process the request and to tamper with it would invalidate the
results.

Are you saying it is ok in ALL cases to replace the "&" symbol in those
HREF= value strings with "&amp;" and that it WONT cause the server to be
confused and pas back the same as it would without the special code?
 
M

Mark Parnell

It seems like the value to the right of the HREF= should not be altered in
any way.

You aren't really altering it. Or, more to the point, you are making it
less ambiguous.
Are you saying it is ok in ALL cases to replace the "&" symbol in those
HREF= value strings with "&amp;" and that it WONT cause the server to be
confused and pas back the same as it would without the special code?

Yes. Indeed, it is more than OK - it is required.

For example, if you had a link like:

http://www.example.com/foo?blah=12&copy=something

It is quite possible that the server would attempt to convert the &copy
to ©, which would definitely screw up the URL. By encoding the & as
&amp;, you prevent that from happening.

Changing & to &amp; is no different to changing a to a - it still
means the same character, it is just written differently. It is just
more important, because the & character is used to denote the beginning
of a character entity.

BTW: Please don't post upside down.
http://www.allmyfaqs.com/faq.pl?How_to_post
http://en.wikipedia.org/wiki/Top-posting

This will help:
http://home.in.tum.de/~jain/software/oe-quotefix/
 
J

Jukka K. Korpela

Mark Parnell said:
For example, if you had a link like:

http://www.example.com/foo?blah=12&copy=something

It is quite possible that the server would attempt to convert the
&copy to ©, which would definitely screw up the URL.

No, the _client_ (browser) _shall_, by HTML specifications up to and
including HTML 4.01, interpret &copy as the copyright sign (thereby
producing a malformed URL). For some odd reason, IE seems to get this
wrong, but most clients get it right. And in XHTML, the data violates the
specifications and the client should just report a syntax error to the
user and not show the page at all. (This is what e.g. Opera does.)
Changing & to &amp; is no different to changing a to a - it
still means the same character, it is just written differently. It is
just more important, because the & character is used to denote the
beginning of a character entity.

Well, yes. Except that there is no such thing as a character entity, when
correct terms are used. The construct a is a character reference.
(See http://www.cs.tut.fi/~jkorpela/chars/ref.html ) (And there is
usually no reason to use a leading zero in a character reference.)
 
T

Toby Inkster

The server won't get confused, because IT NEVER SEES THE &amp;!

Just like if you write: <b>Hello &amp; Welcome!</b> the visitor doesn't
get confused, because the browser shows the visitor a '&' instead of
'&amp;'. If you use an '&amp;' when writing a URL, the server won't get
confused, because the browser converts it to an '&' before requesting the
linked page.
For example, if you had a link like:
http://www.example.com/foo?blah=12&copy=something

It is quite possible that the server would attempt to convert the &copy
to ©, which would definitely screw up the URL.

It's possible that the *browser* might do that, but certainly not the
server.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top