W3C Validator Not Working Offline

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Vigil

    #1

    W3C Validator Not Working Offline

    Hi,

    I have downloaded the source code and installed everything on
    http://validator.w3.org/source/. I have the validator 'working' offline
    with Apache2. I have uploaded a valid XHTML 1 Strict file to the online
    validator and it passes with flying colours. When I pass it to my offline
    version, it says, "This page is not Valid XHTML 1.0 Strict!". This happens
    with both the Address and Local File methods.

    I tried the command line '/usr/local/bin/onsgmls -c
    /usr/local/share/sgml-lib/sp-1.3/pubtext/xml.soc -E0 -R -wvalid
    -wnon-sgml-char-ref -wno-duplicate -wxml' and passed it the test file, but
    no matter how I call it, it always gives the error:

    cannot find "/usr/local/share/sgml-lib/sp-1.3/pubtext/xml.soc"; tried

    I have tried pointing to umpteen possible locations for xml.soc, all that
    are valid. I even copy and paste each time to ls to make sure my eyes are
    not going funny, but no matter what I do, it always says it cannot find
    this.

    I have done a google on the web and on newsgroups and have had some close
    hits but none that are spot on or have otherwise helped. Is this a known
    bug with the latest version of anything? Has anyone got this working? What
    should I do? :-/

    --

    ..

  • Nick Kew

    #2
    Re: W3C Validator Not Working Offline

    In article <pan.2003.10.02 .22.08.59.17875 7@privacy.net>, one of infinite monkeys
    at the keyboard of Vigil <me@privacy.net > wrote:
    [color=blue]
    > I tried the command line '/usr/local/bin/onsgmls -c
    > /usr/local/share/sgml-lib/sp-1.3/pubtext/xml.soc -E0 -R -wvalid
    > -wnon-sgml-char-ref -wno-duplicate -wxml' and passed it the test file, but
    > no matter how I call it, it always gives the error:
    >
    > cannot find "/usr/local/share/sgml-lib/sp-1.3/pubtext/xml.soc"; tried[/color]

    Firstly (not the cause of your problem), sp 1.3 is seriously old.
    Neither that nor even up-to-date OpenSP has a very extensive
    entity catalogue. That means your "offline" validator may have to
    fetch DTDs/etc over the 'net far more often than you'd expect.

    The validator bundles a better [sg|x]ml lib, or you can run the automatic
    updating utility available at http://valet.webthing.com/catalogue/
    [color=blue]
    > I have tried pointing to umpteen possible locations for xml.soc, all that
    > are valid.[/color]

    That message means the environment variable SGML_SEARCH_PAT H doesn't
    include /usr/local/share/sgml-lib/sp-1.3/pubtext , so it won't look there.

    That's caused by the -R flag. Without it you'll get "normal" behaviour,
    which opens a potential security hole when someone tries things like
    <!ENTITY passwd "/etc/passwd">
    [color=blue]
    > I have done a google on the web and on newsgroups and have had some close
    > hits but none that are spot on or have otherwise helped.[/color]

    You must've googled the wrong places ....

    Actually there's probably not much public record: Liam (who discovered
    the security issue and wrote the patch) let us know by private email,
    and we kept it there until we'd all closed it - which was much less
    simple before the OpenSP-1.5 release.

    Is this not documented in the package you downloaded?

    BTW, if you really want offline use, you might be interested in
    validator-lite, <URL:http://www.webthing.co m/software/validator-lite/>
    Oh, and (more shameless self-promotion), since you have Apache 2 you
    can also use the altogether-more-powerful mod_validator from



    --
    Nick Kew

    In urgent need of paying work - see http://www.webthing.com/~nick/cv.html

    Comment

    • Eric Cartman

      #3
      Re: W3C Validator Not Working Offline

      Vigil <me@privacy.net > wrote in message news:<pan.2003. 10.02.22.08.59. 178757@privacy. net>...[color=blue]
      > Hi,
      >
      > I have downloaded the source code and installed everything on
      > http://validator.w3.org/source/. I have the validator 'working' offline
      > with Apache2. I have uploaded a valid XHTML 1 Strict file to the online
      > validator and it passes with flying colours. When I pass it to my offline
      > version, it says, "This page is not Valid XHTML 1.0 Strict!". This happens
      > with both the Address and Local File methods.[/color]

      I had problems at first. Like you I downloaded all the packages,
      installed them and tried to run and it didnt work! What I found was
      that I already had various packages (especially onsgmls) installed on
      my system as default. The new packages I had dowloaded installed to
      default locations different to the originals and so I was still using
      the outdated packages on my system and not those I had downloaded!

      Try doing a 'which onsgmls' and see what you are using, you may find
      its not the one you have just installed! Just amend paths in the
      scripts to suit or amend your LIBRARY paths.

      HTH

      EC
      ..

      Comment

      • Vigil

        #4
        Re: W3C Validator Not Working Offline

        Thanks for your help. I have settled on Validator-lite, which is much
        cleaner :-)

        Might you submit it to Freshmeat so that people can see when new updates
        happen?

        PS. I tried the automatic catalogue updating utility but every one gave an
        unknown HTTP error.

        --

        ..

        Comment

        Working...