Results 1 to 9 of 9
  1. #1
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Rendering very badly coded HTML (all)

    Recently, I download some laws from NY's Consolidated laws.

    It seems that all the files containg the text of the law use very, very, ..., very bad HTML coding.
    This results in unreadable text when rendered to a printer.

    The culprit is something like:

    <pre><basefont size="3">

    <pre width="250">
    </pre>



    basefont is a long deprecated tag.
    When I try to clean up using, say, HTML Tidy, there are oh so many warnings/errors.

    Is there a filter/program that can get rid of this poor formatting more easily?

    For an example:

    1. Go to http://public.leginfo.state.ny.us/menugetf...OMMONQUERY=LAWS
    2. Choose the link to General Obligation Laws.
    3. Then choose General Obligations Title 15: Statutory Short Form Power of Attorney?

    As a last resort, I guess that I can save as a Word doc and munge things within te Word doc.

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Rendering very badly coded HTML (all)

    Hi Howard

    Never, ever use Word as you editing tool..it places unnecessary code in the HTML, it you are to do a clean up exercise use notepad or similar text editor, there are plenty of links to these 3rd party editors throughtthe Software Finds and Wants section of Woody's.

    Otherwise this is a nice, well used, highly rated HTML editor

    NVu

    Your example of <pre width="250"> is not deprecated and but the width attribute was in HTML 4.01 and is definitely not supported XHTML 1.0 Strict DTD

    As for Basefont was deprecated in HTML 4.01 and therefore not supported in XHTML 1.0 of all favours.
    Jerry

  3. #3
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Rendering very badly coded HTML (all)

    THe simplest solution may be to write some VB code that removes the width attribute from all the pre tags and removes basefont.

  4. #4
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Rendering very badly coded HTML (all)

    You can do that if you want, notepad, textpad and many other applications have thing called Find and Replace, it's up to you but why re-invent the wheel my <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15>
    Jerry

  5. #5
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Rendering very badly coded HTML (all)

    Because a program can automate the process.
    Makes no sense to use wordpad to individually open each file .

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Rendering very badly coded HTML (all)

    I do not do enough editing of this type to warrant paying for such a program.
    A trivial program can accomplish my goal.

  7. #7
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Rendering very badly coded HTML (all)

    I suddenly remembered this recent thread, with some more suggestions: HTML editor for multiple files

  8. #8
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Rendering very badly coded HTML (all)

    Hmmm. I just remembered that many moons ago, I wrote a program to change text across files.
    I think I did it in WordBasic, so it was a loooong time ago.
    Gotta track it down.

  9. #9
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Rendering very badly coded HTML (all)

    >Because a program can automate the process.

    Yes my point exactly, why re-invent the wheel, use an application that is designed to do this, like NVu, Textpad and a plethora of other applications....Why ask advice and then throw it back in my face. You have asked for our advice and you have asked for assistance in Finds and Wants.
    Jerry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •