Validating SGML parser?

Discussion in 'Python' started by Benjamin Niemann, Aug 21, 2004.

  1. Hi,

    does anyone know of a validating SGML parser in python (like
    xmlproc.xmlval does for XML)? Goal is to validation HTML against the
    DTD, similar to validator.w3.org, not all SGML obscurities are required.

    If real SGML validation is no option, I could probably rewrite the HTML
    to make it XML conformant and feed it into xmlval - but then I'll have
    to find a way to map line/column numbers from error messages to
    positions in the unmodified HTML. I leave this as an exercise for my
    future self...

    Greetings from Heidelberg, Germany
    Benjamin Niemann
     
    Benjamin Niemann, Aug 21, 2004
    #1
    1. Advertising

  2. Benjamin Niemann wrote:
    > does anyone know of a validating SGML parser in python (like
    > xmlproc.xmlval does for XML)? Goal is to validation HTML against the
    > DTD, similar to validator.w3.org, not all SGML obscurities are required.


    There are plenty of command-line tools for that. Why not use one of them
    through Python?
     
    Leif K-Brooks, Aug 22, 2004
    #2
    1. Advertising

  3. Leif K-Brooks wrote:
    > Benjamin Niemann wrote:
    >
    >> does anyone know of a validating SGML parser in python (like
    >> xmlproc.xmlval does for XML)? Goal is to validation HTML against the
    >> DTD, similar to validator.w3.org, not all SGML obscurities are required.

    >
    >
    > There are plenty of command-line tools for that. Why not use one of them
    > through Python?

    Portability. The current version (that works can handle XHTML variants)
    works out of the box on Windows, Linux and probably everything else that
    supports Python. Would be nice if it could stay this way...
     
    Benjamin Niemann, Aug 22, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. (Pete Cresswell)

    SGML Parser doesn't like <script> contents?

    (Pete Cresswell), Dec 24, 2004, in forum: HTML
    Replies:
    30
    Views:
    1,399
    dszady
    Dec 27, 2004
  2. Clifford W. Racz
    Replies:
    4
    Views:
    2,033
    Clifford W. Racz
    Feb 13, 2004
  3. Zach Dennis

    HTML-Parser / SGML-Parser

    Zach Dennis, Oct 1, 2003, in forum: Ruby
    Replies:
    5
    Views:
    404
    Bernard Delmée
    Oct 1, 2003
  4. bug in SGML parser

    , Dec 7, 2006, in forum: Ruby
    Replies:
    0
    Views:
    141
  5. Srijayanth Sridhar
    Replies:
    0
    Views:
    97
    Srijayanth Sridhar
    May 23, 2008
Loading...

Share This Page