471,605 Members | 1,463 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,605 software developers and data experts.

URL validation

For XHTML 1.1, I find that the following URL is not valid:

<a href="http://www.navybuddies.com/crew.php?action=ship&ship=SS_482">

The reason of course is the ampersand, and when I replace it with
&amp; the page validates.

However, I'm told that target="_blank" is not valid in XHTML
strict. Does this apply to the URL above? I tried but was unable to
find a discussion of XHTML 1.1 URL markup on line.

--

Haines Brown, KB1GRM

Nov 18 '07 #1
8 1612
On Nov 18, 1:16 pm, Haines Brown <bro...@teufel.hartford-hwp.com>
wrote:
For XHTML 1.1, I find that the following URL is not valid:

<a href="http://www.navybuddies.com/crew.php?action=ship&ship=SS_482">
Well no, but what does this have to do with stylesheets?
The reason of course is the ampersand, and when I replace it with
&amp; the page validates.
Exactly.
However, I'm told that target="_blank" is not valid in XHTML
strict.
Yes, the target attribute doesn't exist in the strict variants. I
still don't see what this has to do with stylesheets though.
Does this apply to the URL above?
The value of the href attribute is irrelevant, the a element doesn't
have a target attribute.
I tried but was unable to find a discussion of XHTML 1.1 URL markup on line.
XHTML 1.1 is an exercise in pointlessness for the vast majority of
authors (even more so then 1.0). The text/html RFC doesn't give its
blessing to serve it as text/html, so you can kiss IE support goodbye
(without a lot of jumping through pointless hoops to turn it into HTML
4.01 with client side XSLT or something else along similar lines).

There isn't really much to discuss though, the spec (http://w3.org/TR/
xhtml11/) describes the very small number of differences between XHTML
1.0 Strict and XHTML 1.1.

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/
Nov 18 '07 #2
Haines Brown wrote:
For XHTML 1.1, I find that the following URL is not valid:
<a href="http://www.navybuddies.com/crew.php?action=ship&ship=SS_482">

The reason of course is the ampersand, and when I replace it with
&amp; the page validates.

However, I'm told that target="_blank" is not valid in XHTML
strict.
...nor is it valid in HTML 4.01 Strict. Only in Transitional.
Does this apply to the URL above? I tried but was unable to
find a discussion of XHTML 1.1 URL markup on line.
The above fragment of code does not have: target="_blank"

Let your visitors determine for themselves if they want to open links in
new windows, or tabs.

How are you serving your XHTML 1.1? Properly as application/xhtml+xml ?

--
-bts
-Motorcycles defy gravity; cars just suck
Nov 18 '07 #3
Understood concerning my original question. Also, my apologies for
having inadvertantly posted this on the css group.

"Beauregard T. Shagnasty" <a.*********@example.invalidwrites:
How are you serving your XHTML 1.1? Properly as application/xhtml+xml ?
This is a good qustion. The Prolog for the page is:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xml:lang="en" >

There are no meta http_equiv statements in the head. The URL is:
http://www.USS-Irex.info/index02.html

However, Web Sniffer reports regarding the Response Header:

HTTP Status Code: HTTP/1.1 404 Not Found

Strange. I'm telling it to look for XHTML 1.1, and the DTD can't be
found? The error message is common enough, but seems to have to do
with dynamic pages.

And it says:

Content-Type: text/html; charset=iso-8859-1

--

Haines Brown, KB1GRM

Nov 18 '07 #4
Haines Brown wrote:
"Beauregard T. Shagnasty" writes:
>How are you serving your XHTML 1.1? Properly as application/xhtml+xml ?

This is a good qustion. The Prolog for the page is:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xml:lang="en" >

There are no meta http_equiv statements in the head. The URL is:
http://www.USS-Irex.info/index02.html
Ah, the Irex site... <g>
However, Web Sniffer reports regarding the Response Header:

HTTP Status Code: HTTP/1.1 404 Not Found
Same here. Cannot find the link. Your main page, index.html is being
served as text/html.
Strange. I'm telling it to look for XHTML 1.1, and the DTD can't be
found? The error message is common enough, but seems to have to do
with dynamic pages.
Not enough info to tell, from here. I don't have the problem with
dynamic pages (though I am not serving any XHTML 1.1).
And it says:

Content-Type: text/html; charset=iso-8859-1
Why do you want to use XHTML 1.1, then serve it as text/html? I remain
puzzled. Didn't we mention in earlier threads that Internet Explorer
just chokes on properly-served XHTML (either 1.0 or 1.1)?

--
-bts
-Motorcycles defy gravity; cars just suck
Nov 18 '07 #5
Haines Brown wrote:
For XHTML 1.1, I find that the following URL is not valid:

<a href="http://www.navybuddies.com/crew.php?action=ship&ship=SS_482">

The reason of course is the ampersand, and when I replace it with
&amp; the page validates.
Which page? The page containing the above tag or the page it links to?
However, I'm told that target="_blank" is not valid in XHTML
strict. Does this apply to the URL above?
I don't understand the question. The target attribute is the target
attribute. It's independent of the URL in the href attribute.
I tried but was unable to
find a discussion of XHTML 1.1 URL markup on line.
URLs aren't defined by XHTML. URLs are defined externally to the HTML
and XHTML specifications. URLs also don't contain markup. So it isn't
clear what you're trying to find out.
Nov 19 '07 #6
Ben Bacarisse wrote:
Haines Brown <br****@teufel.hartford-hwp.comwrites:
<snip all>

Thanks for answering, Ben. Couldn't have said it better myself.

--
-bts
-Motorcycles defy gravity; cars just suck
Nov 21 '07 #7
"Beauregard T. Shagnasty" <a.*********@example.invalidwrites:
Ben Bacarisse wrote:
>Haines Brown <br****@teufel.hartford-hwp.comwrites:
<snip all>

Thanks for answering, Ben. Couldn't have said it better myself.
Too kind. I might not have done so were it not for the fact that
someones news reader and/or feed got confused. I saw the past as a
direct reply to my (old) contribution to the thread -- even though the
quotes were all from yours. Seem to be inviting my input!

--
Ben.
Nov 21 '07 #8
On Wed, 21 Nov 2007, Haines Brown wrote:
Sorry to be dense, but what is a "header"?
Off-topic.

Please refer to news:comp.infosystems.www.servers.unix
Nov 21 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

21 posts views Thread by Stefan Richter | last post: by
2 posts views Thread by wumingshi | last post: by
4 posts views Thread by Tim Meagher | last post: by
6 posts views Thread by Stephen | last post: by
7 posts views Thread by Ryan Ternier | last post: by
5 posts views Thread by Chris | last post: by
6 posts views Thread by Jon Paal | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.