Link checking on local documents

Post here if your topic is about CSS HTML Validator but doesn't fit in another forum.
Post Reply
User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3588
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Link checking on local documents

Post by Albert Wiersch »

Does this issue affect anyone here?

Let's say you have you website that you upload to your webserver here:
C:\My_Websites\site1\

And you have a document
C:\My_Websites\site1\index.html

In that document, there is a src="/gif/image.gif" so you have this file on your disk:
C:\My_Websites\site1\gif\image.gif

But the link checker tries to check "C:\gif\image.gif" instead of "C:\My_Websites\site1\gif\image.gif" because it doesn't know the correct "root".

Does anyone experience this? If so, would you like a way to address this and how big of an issue is it for you?
User avatar
Lou
Rank V - Professional
Rank V - Professional
Posts: 282
Joined: Fri Jul 29, 2005 5:55 pm
Location: CO
Contact:

Re: Link checking on local documents

Post by Lou »

Albert Wiersch wrote:Does this issue affect anyone here?
Nope. I use relative addressing, as in src="./gif/image.gif"

This way I can move index.html (and /gif/) with its reference to /gif/image.gif from
my development area C:\development\site1
to ...\My_Websites\main
without having to change the reference.
User avatar
MikeGale
Rank VI - Professional
Rank VI - Professional
Posts: 721
Joined: Mon Dec 13, 2004 1:50 pm
Location: Tannhauser Gate

Post by MikeGale »

I tend to run checking through a web server not the file server, in part, to avoid these issues.

I've found some tools that accept a file path to web server path mapping, to really benefit from that capability.

(I tend to use root relative addressing (/dir/file.ext) so that all files that reference a resource use exactly the same string, irrespective of where they appear in the directory graph.)
User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3588
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Post by Albert Wiersch »

I have added some basic "mapping" functionality so when root-relative paths are used, they can be mapped to the correct local path or an http:// path. I'd like to get feedback on this so if you think this would be useful, then please let me know when CSE HTML Validator Professional v9.00 BETA 1 is out and I will let you know how to do it through the appropriate config file.

I really want to get the first BETA out but the switch to a new editor component still requires some work. I am not sure how long this will take since much of it depends on a the editor component developers.
Post Reply