473,385 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Use local W3C validator on local site?

Hi,

I'm an Austrian writer living in Montpezat (South France). I just installed
a local W3C validator on my machine (Slackware 10.1, local Apache server).
It's accessible as http://w3c-validator, because I'm on dialup and I want
to check pages offline.

Unfortunately, URL upload won't work, because the validator doesn't accept
any URL's beginning with http://localhost.

Is there any way to circumvent this limitation? I want to check the output
of a local PHP site, and I don't know how to check otherwise than by URL
upload.

Any suggestions?

Niki Kovacs
--
I'm not as think as you stoned I am.
Sep 17 '05 #1
13 10767
Sorry, the link should be:

http://validator.w3.org/feedback.html

--
James Pickering
http://jp29.org/

Sep 17 '05 #3
James Pickering wrote:
http://validator.w3.org/feedback.html


What's that? RTFM? Read The Feedback Man? Anyone else has something better
to offer?

NK
--
I'm not as think as you stoned I am.
Sep 17 '05 #4
Niki Kovacs wrote:
Any suggestions?


Either of:
(1) Just remove that check. But bear in mind that you
might be opening a security hole by exposing internal
details of your system to any user.
(2) Google for validator-lite, which is the same parser in
a desktop tool, and quite a lot simpler to set up
than a webserver-based validator.

--
Nick Kew
Sep 17 '05 #5
Niki Kovacs wrote:
Unfortunately, URL upload won't work, because the validator doesn't accept
any URL's beginning with http://localhost.

Is there any way to circumvent this limitation?


http://validator.w3.org/docs/install.html

Edit /etc/w3c/validator.conf to reflect where files are in
your installation, and configure other parameters there as
you wish. This file is well commented and modifying it should
be relatively straightforward.

And lo, on lines 50-51 (on my version from CVS a few months ago) we have:

# Whether private RFC1918 addresses are allowed.
Allow Private IPs = no
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Sep 17 '05 #6
On Sat, 17 Sep 2005 17:56:40 +0200 in
comp.infosystems.www.authoring.html, Niki Kovacs favored us with...
I'm an Austrian writer living in Montpezat (South France). I just installed
a local W3C validator on my machine (Slackware 10.1, local Apache server).
It's accessible as http://w3c-validator, because I'm on dialup and I want
to check pages offline.

Unfortunately, URL upload won't work, because the validator doesn't accept
any URL's beginning with http://localhost.

Is there any way to circumvent this limitation?


Sure! Since you have a local server, all you need do is configure a
Virtual Host in Apache. For instance, here's how I set up the virtual
host oldtc3.me in httpd.conf:

<VirtualHost *>
ServerName oldtc3.me
DocumentRoot "z:/web_site"
<Directory />
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
</Directory>
</VirtualHost>

The document root is the directory that acts as the root directory of
the virtual host: think of it as a sort of mount point.

Then separately in my HOSTS file I configure oldtc3.me to have IP
address 127.0.0.1, which stands for the local machine. (You seem to
be on a UNIX. I don't know what corresponds to the HOSTS file, but
I'm sure there must be some file that forces a given host to be at a
given IP address and bypasses normal DNS lookup.)

Once that's done, my browser does just fine with URLs like
"http://oldtc3.me/stat/cltlab.htm". Since it's http, I'm sure your
local validator would also do fine.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Sep 18 '05 #7
Nick Kew wrote:
Either of:
(1)*Just*remove*that*check.**But*bear*in*mind*that *you
might*be*opening*a*security*hole*by*exposing*inter nal
details*of*your*system*to*any*user.


I run Slack Linux 10.1 with a hand-crafted iptables/netfilter firewall, so
my first thought about this is: let 'em come:oD

Cheers,

Niki Kovacs (same initials, hey)
--
I'm not as think as you stoned I am.
Sep 18 '05 #8
David Dorward wrote:
Edit*/etc/w3c/validator.conf*to*reflect*where*files*are*in
your*installation,*and*configure*other*parameters* there*as
you*wish.*This*file*is*well*commented*and*modifyin g*it*should
be*relatively*straightforward.

And lo, on lines 50-51 (on my version from CVS a few months ago) we have:

# Whether private RFC1918 addresses are allowed.
Allow Private IPs = no


Thanks! That solved the problem.

Niki Kovacs
--
I'm not as think as you stoned I am.
Sep 18 '05 #9
On Sat, 17 Sep 2005 20:32:07 +0100 in
comp.infosystems.www.authoring.html, Nick Kew favored us with...
(2) Google for validator-lite, which is the same parser in
a desktop tool, and quite a lot simpler to set up
than a webserver-based validator.


Does validator-lite find different problems from NSGMLS, or is it
just a different user interface for the same validation engine?

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Sep 19 '05 #10
Stan Brown wrote:
On Sat, 17 Sep 2005 20:32:07 +0100 in
comp.infosystems.www.authoring.html, Nick Kew favored us with...
(2) Google for validator-lite, which is the same parser in
a desktop tool, and quite a lot simpler to set up
than a webserver-based validator.

Does validator-lite find different problems from NSGMLS,

No. At least not if you update to onsgmls, since the old nsgmls
has been unmaintained for many years. It does offer the option
to find more errors than the W3C validator, as documented under
"parse mode"s. That is exactly equivalent to onsgmls commandline
options.
or is it
just a different user interface for the same validation engine?


It is, as I said, the same parser - OpenSP. Also featured in the other
online HTML validation services, and in Liam's windows desktop
"arealvalidator". Whereas onsgmls is a commandline wrapper on OpenSP,
Validator-lite is a GUI wrapper.

--
Nick Kew
Sep 19 '05 #11
On Mon, 19 Sep 2005 10:16:28 +0100 in
comp.infosystems.www.authoring.html, Nick Kew favored us with...
Stan Brown wrote:
On Sat, 17 Sep 2005 20:32:07 +0100 in
comp.infosystems.www.authoring.html, Nick Kew favored us with...
(2) Google for validator-lite, which is the same parser in
a desktop tool, and quite a lot simpler to set up
than a webserver-based validator.

Does validator-lite find different problems from NSGMLS,

No. At least not if you update to onsgmls, since the old nsgmls
has been unmaintained for many years. It does offer the option
to find more errors than the W3C validator, as documented under
"parse mode"s. That is exactly equivalent to onsgmls commandline
options.


Thanks, Nick. That raises a follow-up question: will ONSGMLS find
anything in an HTML4.01 document that NSGMLS missed> In other
words, is it actually worth upgrading, changing my batch files,
etc?

I'm still struggling along with Windows, so compiling from source
is rather a pain for me, over and above the usual glitches to be
expected with any new software. I'd just as soon not do it unless
there's some specific advantage.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:

http://diveintomark.org/archives/200..._wont_help_you
Sep 19 '05 #12
Stan Brown wrote:
Does validator-lite find different problems from NSGMLS,

No. At least not if you update to onsgmls, since the old nsgmls
has been unmaintained for many years. It does offer the option
to find more errors than the W3C validator, as documented under
"parse mode"s. That is exactly equivalent to onsgmls commandline
options.

Thanks, Nick. That raises a follow-up question: will ONSGMLS find
anything in an HTML4.01 document that NSGMLS missed> In other
words, is it actually worth upgrading, changing my batch files,
etc?


Not sure about that (I'm not quite sure where nsgmls was at when
James Clark handed it over to the team @sourceforge and it
became onsgmls).
I'm still struggling along with Windows, so compiling from source
is rather a pain for me, over and above the usual glitches to be
expected with any new software. I'd just as soon not do it unless
there's some specific advantage.


There are binaries around. Liam's arealvalidator includes it (I think),
and Björn Höhrmann has compiled uptodate windows versions, which I think
he makes available.

--
Nick Kew
Sep 19 '05 #13
On Mon, 19 Sep 2005 22:40:33 +0100 in
comp.infosystems.www.authoring.html, Nick Kew favored us with...
There are binaries around. Liam's arealvalidator includes it (I think),
and Björn Höhrmann has compiled uptodate windows versions, which I think
he makes available.


Thanks again, Nick! With that hint, I googled for
"Björn Höhrmann" onsgmls
and in the first page of hits I found a page that led me to
http://bjoern.hoehrmann.de/ports/Ope...-win32-bin.zip

IN case someone else googles for he informaton, these are Windows
binaries of ONSGMLS. The zip file contains no documentation, but I
found a man page at
http://linuxcommand.org/man_pages/onsgmls1.html

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:

http://diveintomark.org/archives/200..._wont_help_you
Sep 20 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

195
by: Torbjørn Pettersen | last post by:
As you might have noticed I'm trying to clean up my web site's HTML code. The way I do it is simply more or less redoing to complete site, testing it on a web server I have set up on my local...
6
by: James Owens | last post by:
I maintain a small web page for internal company use. People access it by typing "library" in their browser address bar; this defaults to "http://library" which the network admin magically...
22
by: Lee K. Seitz | last post by:
What are this group's members' ideas about including W3C validator (http://validator.w3.org) graphics on web pages? Specifically, should they be on every page? I can see including an HTML/XHTML...
4
by: Alan Silver | last post by:
Hello, I have a site that produces 100% valid XHTML 1.0 Strict when viewed in a browser (IE, Firefox, etc). I just tried validating the site with an on-line validator, and got several errors. ...
40
by: VK | last post by:
Hi, After the response on my request from W3C I'm still unclear about Tidy vs. Validator discrepansies. That started with <IFRAME> issue, but there is more as I know. Anyway, this very basic...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.