dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: XHTML Woes

  1. #1
    Join Date
    Dec 2002
    Posts
    83

    Thumbs down XHTML Woes

    In my reconstructed site (in which I basically took most of the graphic
    content from my old site; & rebuilt a new site, from scratch, in DW), I made
    the mistake of creating all my pages as XHTML Compliant. When validated,
    there were hundreds of mistakes.

    Worse yet, the most important page, which contains a PayPal button linking
    to a purchase form at PayPal, did not work at all...& the error was related
    to (you guessed it), XHTML!!!

    Out of frustration (& not being able to find an answer as how to convert
    back to regular, average, everyday, ordinary HTML in the discussion groups),
    I compared, through DW's Preferences dialog, new HTML 4.01 page templates,
    which were coded as follows:

    ----------------------------------------------------------------------------
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body>

    </body>
    </html>
    ----------------------------------------------------------------------------

    with new XHTML page templates, which were coded as follows:

    ----------------------------------------------------------------------------
    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    </head>

    <body>
    </body>
    </html>
    ----------------------------------------------------------------------------

    And for the page that didn't work, I changed the DTD's (& all tags prior to
    <head>) from the second (XHTML) to the first (HTML)...

    ...AND NOW THE PAGE WORKS FINE!

    So, my questions are:

    1) Did I do the right thing?...& can I do the same thing with the rest of my
    pages in order to convert back to HTML...

    ...or...

    2) Is converting back more complex than this (realizing that perhaps as DW
    created my pages as XHTML compliant, the code for each entire page was
    written as XHTML)?

    ...&...

    3) If this is the case, how can I easily & correctly convert the pages back
    to HTML?

    Thanks,

    mark4man

  2. #2
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,279
    Your best bet is to simply correct the errors in the XHTML version. Your second best bet is to use HTML Tidy to change the XHTML into HTML. XHTML isn't exactly just HTML with restrictions, though it can be. It depends on how it is used.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  3. #3
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,137
    I think if everything works for you for now thats good.
    However,you should take some time to make sure that your pages do validated against XHTML at least for transitional DTD if not strict.That will help your pages viewable in near future on most browsers.

    For fast conversions,I think suggestion made above is worth a shot.
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  4. #4
    Join Date
    Dec 2002
    Posts
    83

    Thumbs up Cahrles & Khalid Ali...

    Thanks very much!

    Think I will try going through all the errors in the validation list, to see if they can be corrected.

    What can it hurt?

    Thanks again,

    mark4man

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles