DTP


 
Lively discussions on the graphic arts and publishing — in print or on the web


Go Back   Desktop Publishing Forum > General Discussions > Web Design

Reply
 
Thread Tools Display Modes
Old 03-21-2006, 12:55 PM   #1
Steve Rindsberg
Staff
 
Join Date: Nov 2004
Posts: 6,713
Default One page, two validation questions

The page in question is

http://www.rdpslides.com/pptools/faqindex.html

The W3C validator grumbles about two things:

<a name="PROBLEMS/FIXES"> etc ...

It WAS griping about this when there was a literal "/" character in the same place, so I rewrote the code (as it suggested) to replace it with the entity code. Now it doesn't like THAT. Shouldn't it treat &#xxx; references strictly as text? Bug in the validator, perhaps?

If this really isn't allowed, I can fix it in the code that generates the references automatically but don't want to bother with that just to satify the appetite of a manylegger in the validator.

===

And next, it complains about what I think is a legitimate problem.
But this is long enough. I'll start another thread. <g>

   
__________________
Steve Rindsberg
====================
www.pptfaq.com
www.pptools.com
and stuff
Steve Rindsberg is offline   Reply With Quote
Old 03-21-2006, 02:09 PM   #2
Kelvyn
Staff
 
Kelvyn's Avatar
 
Join Date: Feb 2005
Location: In the Heart of the English Lake District
Posts: 1,381
Default

ISTR that certain characters are not allowed in name attributes. Instead of
PROBLEMS/FIXES have you tried PROBLEMS / FIXES (with spaces)?

   
__________________
Kelvyn

Web site design, hosting and marketing, Keswick in the UK Lake District

If you are planning a visit to Keswick then try Keswick Tourist Information website

Kelvyn is offline   Reply With Quote
Old 03-22-2006, 08:56 PM   #3
Steve Rindsberg
Staff
 
Join Date: Nov 2004
Posts: 6,713
Default

I've run into other problems with spaces in name attributes, so the code that gens all this html automatically replaces spaces with underscores.

And since it replaces "/" with $#047; so there's no literal character "/" there, just the entity that says "Draw a slash for me, there's a good browser".

The validator issues the same complaint whether it's a literal slash or an entity representation, which leads me to think that the validator's a bit off in the head.

   
__________________
Steve Rindsberg
====================
www.pptfaq.com
www.pptools.com
and stuff
Steve Rindsberg is offline   Reply With Quote
Old 03-22-2006, 11:58 PM   #4
iamback
Member
 
iamback's Avatar
 
Join Date: Oct 2005
Location: Amsterdam, NL
Posts: 4,894
Default

Quote:
Originally Posted by Steve Rindsberg
I've run into other problems with spaces in name attributes, so the code that gens all this html automatically replaces spaces with underscores.
The name attribute is of type CDATA and case-sensitive:
12.2 The A element:
Quote:
name = cdata [CS]
This attribute names the current anchor so that it may be the destination of another link. The value of this attribute must be a unique anchor name. The scope of this name is the current document. Note that this attribute shares the same name space as the id attribute.
Rules for for CDATA as used for name:
6.2 SGML basic types:
Quote:
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
Note: no slashes, and no & (which rules out using entities).

   
__________________
Marjolein Katsma
Look through my eyes on Cultural Surfaces (soon!), My ArtFlakes shop and Flickr.
Occasionally I am also connecting online dots... and sometimes you can follow me on Marjolein's Travel Blog
iamback is offline   Reply With Quote
Old 03-23-2006, 07:30 PM   #5
Steve Rindsberg
Staff
 
Join Date: Nov 2004
Posts: 6,713
Default

Excellent ... that answers it nicely ... thanks!

Luckily, I've two different routines that I push the name text through, one to convert ampersands and such into entities, another to "de-space". I'll have the de-space routine remove other invalid characters as well.

   
__________________
Steve Rindsberg
====================
www.pptfaq.com
www.pptools.com
and stuff
Steve Rindsberg is offline   Reply With Quote
Old 03-23-2006, 07:59 PM   #6
Steve Rindsberg
Staff
 
Join Date: Nov 2004
Posts: 6,713
Default

Bingo ... that's fixed now. My little program now autoreplaces spaces and all but valid punctuation with hyphens or underscores. Thanks again!

   
__________________
Steve Rindsberg
====================
www.pptfaq.com
www.pptools.com
and stuff
Steve Rindsberg is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FF & IE questions... terrie Web Site Building & Maintenance 8 09-07-2006 12:29 PM
HTML Validation at www.w3.org dthomsen8 Web Site Building & Maintenance 2 06-21-2006 04:47 PM
One page, two questions, Part II Steve Rindsberg Web Design 17 03-24-2006 06:42 PM
More ID Questions BobRoosth Print Design 19 10-20-2005 04:30 PM
ID Questions BobRoosth Print Design 4 09-29-2005 05:37 AM


All times are GMT -8. The time now is 05:37 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Contents copyright 2004–2014 Desktop Publishing Forum and its members.