SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 26
  1. #1
    SitePoint Wizard aaron.martone's Avatar
    Join Date
    Feb 2003
    Location
    Florida, USA
    Posts
    2,322
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    XHTML hates ASP :(

    Here's the code that's causing problems:

    Code:
    <?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">
    <%@ LANGUAGE="VBSCRIPT" CODEPAGE="1252" %>
    <!-- #include file="includes/am.asp"-->
    <!-- #include file="includes/md5.asp" -->
    <%
    writeSideBar1 = true
    writeSideBar2 = true
    writeSideBar3 = true
    %>
    <!--
    /* The contents of this site are copyright 2003, Aaron Martone (www.aaronmartone.com)
       aaronmartone.com ("(am)") maintains this site for your personal entertainment, information,
       education and communication.  Please feel free to browse the Site.  You may download
       material displayed on the Site for non-commercial, personal use only, provoided you also
       retain all copyright and other proprietary notices contained on the materials.  You may
       not, however, distribute, modify, transmit, reuse, report, or use the contents of the Site
       for public or commercial purposes, including the text, images, audio and video without
    */ Aaron Martone's written permission. 
    //-->
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>aaron.martone | web developer</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <script language="JavaScript" type="text/javascript" src="js/am.js">
    <!--
    //-->
    </script>
    <link href="css/am.css" rel="stylesheet" type="text/css" />
    </head>
    <body background="images/bg_black.gif">
    Anyways, I'm gettin the following errors in DWMX6.1 when I VALIDATE MARKUP:

    Line 4: "The tag name "!--" not found in currently active versions."
    Line 19: "End of line reached before closing quote. Quoted strings cannot span lines."
    Line 20: "The tag name "!--" not found in currently active versions."
    Line 22: "The tag "html" is not allowed within "!--/*" It is only allowed within: ."

    Any ideas? Trying to go for XHTML/CSS Compliancy here....

  2. #2
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd assume a buggy validator, it must be something to do with the ASP lines in there.

    Removing them and putting it through the W3C validator, you get one problem:

    The little "TM" thing is an invalid character, you can't put it in a valid HTML file.

    See: http://validator.w3.org/docs/errors.html#bad-char

    hth,
    Douglas
    Hello World

  3. #3
    SitePoint Wizard aaron.martone's Avatar
    Join Date
    Feb 2003
    Location
    Florida, USA
    Posts
    2,322
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I get warnings on that.

    It says any ASCII value above 127 needs to be represented in it's code format ( &trade; and &copy; )

    I'm suprised DWMX would be buggy. Are there any online validators that can validate CUT N PASTE text (pre or after it is run?) Or has the ability to parse my local files?

  4. #4
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hehe, try this:

    Code:
    <?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">
    <%@ LANGUAGE="VBSCRIPT" CODEPAGE="1252" %>
    
    <!-- #include file="includes/am.asp"-->
    <!-- #include file="includes/md5.asp" -->
    
    <%
    writeSideBar1 = true
    writeSideBar2 = true
    writeSideBar3 = true
    %>
    
    <!--
    /* The contents of this site are copyright 2003, Aaron Martone (www.aaronmartone.com)
       aaronmartone.com ("(am)?" ) maintains this site for your personal entertainment, information,
       education and communication.  Please feel free to browse the Site.  You may download
       material displayed on the Site for non-commercial, personal use only, provoided you also
       retain all copyright and other proprietary notices contained on the materials.  You may
       not, however, distribute, modify, transmit, reuse, report, or use the contents of the Site
       for public or commercial purposes, including the text, images, audio and video without
    */ Aaron Martone's written permission. 
    //-->
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>aaron.martone | web developer</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <script language="JavaScript" type="text/javascript" src="js/am.js">
    <!--
    //-->
    </script>
    <link href="css/am.css" rel="stylesheet" type="text/css" />
    </head>
    <body background="images/bg_black.gif">
    </body>
    </html>
    The extra whitespace seems to keep MX happy.

    The <?xml line will make IE6 go into quirks mode, sort of like IE5 but not quite. You may or may not want to keep it there. It will make testing your page crossbrowser harder though (makes IE6 less predictable).

    Douglas
    Hello World

  5. #5
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Aaron, with a page like that, you have to send the generated source code to the validator. Also, the "codepage=1252" declaration will probably invalidate your code, as it will output this line to the browser:
    Code:
    <meta http-equiv="content-type" content="text/html; charset=windows-1252">
    ^^^notice the lack of a closing tag marker ( /> ).

    If you're running your files locally and not on a publicly available site, the best thing to do is save a copy of the generated source as a .html file and upload it to the W3C's validator at http://validator.w3.org/. They will accept a file you upload for validation.

  6. #6
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vgarcia
    If you're running your files locally and not on a publicly available site,
    I can't remember what DW takes out of the pages when you click "preview in browser", but you may be able to setup a "preview in Opera" where you can then just press Ctrl+Alt+V to validate the page (via upload). (And by the looks of things, this page has 260+ invalid bits in it, and it renders fine )

    Douglas
    Hello World

  7. #7
    SitePoint Wizard aaron.martone's Avatar
    Join Date
    Feb 2003
    Location
    Florida, USA
    Posts
    2,322
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hmmm. Closing tag markers.... Odd, I thought DWMX would add those automatically. Ok. So validate the OUTPUT source code.... Hopefully I can cut and paste this code.....the URL validation seemingly doesn't work with localhost requests.....

  8. #8
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by aaron.martone
    the URL validation seemingly doesn't work with localhost requests.....
    Of course not, that would be impossible. On the other hand, if you're running a server version of Windows and get to your site by typing in your IP address, the URL validator might be able to reach it. Of course, for the easiest way to go about it, I'd take the Opera approach that Doug mentioned.

  9. #9
    SitePoint Wizard aaron.martone's Avatar
    Join Date
    Feb 2003
    Location
    Florida, USA
    Posts
    2,322
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Oh man, for some reason, localhost is only outputting source code (and it's COLOR coded!)

  10. #10
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by aaron.martone
    Oh man, for some reason, localhost is only outputting source code (and it's COLOR coded!)
    Hello World

  11. #11
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, I don't understand you problem, but just as a for-your-information thing, you should probably read an article like this one. It might start to clear up things like "localhost" (That's network speak for "Your Computer") and why DWMX never sees the meta line (" Odd, I thought DWMX would add those automatically").

    Douglas
    Hello World

  12. #12
    SitePoint Evangelist ucahg's Avatar
    Join Date
    Apr 2001
    Location
    Sarnia, Ontario, Canada
    Posts
    434
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vgarcia
    Of course not, that would be impossible. On the other hand, if you're running a server version of Windows and get to your site by typing in your IP address, the URL validator might be able to reach it. Of course, for the easiest way to go about it, I'd take the Opera approach that Doug mentioned.
    You should be able to run a web server on any version of windows, and then it is just a matter of typing in your IP address instead of localhost.
    Love it? Hate it? Helpful? Useless?
    Use the rate button to let me know what you think of my post!

  13. #13
    SitePoint Wizard aaron.martone's Avatar
    Join Date
    Feb 2003
    Location
    Florida, USA
    Posts
    2,322
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I understand the concept of localhost (127.0.0.1 MS Loopback address)....lol.

    Simply put, I render the page on IIS, and it's showing COLOR CODED code instead of the website now..... Maybe I'm missing something....

  14. #14
    SitePoint Wizard aaron.martone's Avatar
    Join Date
    Feb 2003
    Location
    Florida, USA
    Posts
    2,322
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hmmm. If I remove this
    Code:
    <%@ LANGUAGE="VBSCRIPT" CODEPAGE="1252" %>
    <!-- #include file="includes/am.asp" -->
    <!-- #include file="includes/md5.asp" -->
    <%
    writeSideBar1 = true
    writeSideBar2 = true
    writeSideBar3 = true
    %>
    <%
    ' The contents of this site are copyright &copy;2003, Aaron Martone (www.aaronmartone.com)
    ' aaronmartone.com ("(am™)" ) maintains this site for your personal entertainment, information,
    ' education and communication. Please feel free to browse the Site. You may download
    ' material displayed on the Site for non-commercial, personal use only, provoided you also
    ' retain all copyright and other proprietary notices contained on the materials. You may
    ' not, however, distribute, modify, transmit, reuse, report, or use the contents of the Site
    ' for public or commercial purposes, including the text, images, audio and video without
    ' Aaron Martone's written permission. 
    %>
    And run home.asp through the VALIDATOR, it comes back as VALID XHTML 1.0 TRANSITIONAL It's giving me multiple "column 4: character "<" is the first character of a delimiter but occurred as data " errors though. I guess they're warnings

  15. #15
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    aaah, now I understand.

    You've saved your file as .xml or something, or IIS is sniffing the file and reading the XML prolog, and telling IE that it is dealing with XML.

    Can you click a little + (or -) at the start of the lines of code to collapes/uncollape the code?

    If so, you're sorted.

    IE understands XML or HTML, not XHTML. You have to tell it that you are using HTML. Call you file .htm or .html for a start, try removing the <?xml line from your file, check mime types etc...

    Douglas
    Hello World

  16. #16
    SitePoint Wizard aaron.martone's Avatar
    Join Date
    Feb 2003
    Location
    Florida, USA
    Posts
    2,322
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yeah yeah I can Doug! I didn't notice that before. There are -'s in front of each line and clicking it opens and closes the tag hierarchy

    If I save as .html, I'll lose my ASP ability right? I can't lose that

  17. #17
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you try removing the <?xml line?
    Edit:

    For some fancy stuff, try adding this to your XML file:
    Code:
    <?xml-stylesheet href="mystyle.css" type="text/css"?>
    http://www.w3.org/TR/xml-stylesheet/
    Douglas
    Hello World

  18. #18
    SitePoint Wizard aaron.martone's Avatar
    Join Date
    Feb 2003
    Location
    Florida, USA
    Posts
    2,322
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The file is called home.asp (not home.xml or home.xhtml) The browser renders it with that +/- thing and there is an error at the bottom:

    "End tag 'td' does not match start tag 'br' Error processing resources (url) Line 152, Position 9"

    <span class="content11px">
    am is a visual identity firm.......
    <br>

    Maybe I'll add a </span> to the end of that....I try removing that <?xml thing as well....

  19. #19
    SitePoint Wizard aaron.martone's Avatar
    Join Date
    Feb 2003
    Location
    Florida, USA
    Posts
    2,322
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Well I learned ONE thing! Always backup files! Lol. Ever since I've tried to get this page to be compliant, nothing shows in the browser anymore. It's a white page. View source is that and what not, but nothing shows.

    Crap-crappity crap crap. Maybe a swift kick? Eh? Anyways, thanks for all the help guys. But I'm gonna forget doing XHTML/CSS compliancy. There's just too many inconsistencies with ASP and XHTML (odd, cause one seems more Server side script and the other client side), but nonetheless both conflict a little too often with each other.

    Not with my headache. I'll just keep making non XHTML/CSS-Compliant pages. I guess we have the browser wars to thank for these inconsistencies.
    Last edited by aaron.martone; Sep 13, 2003 at 19:12.

  20. #20
    Super Ninja Monkey Travis's Avatar
    Join Date
    Dec 2001
    Location
    Sioux City, Iowa
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your ASP has nothing to do with your XHTML, except the fact that you have to make the ASP output valid code. As for the blank page, I know that in PHP you get a blank page when you have a parse error. Perhaps its something similar with your ASP.
    Travis Watkins - Hyperactive Coder
    My Blog: Realist Anew
    Projects: Alacarte - Gnome Menu Editor

  21. #21
    SitePoint Wizard aaron.martone's Avatar
    Join Date
    Feb 2003
    Location
    Florida, USA
    Posts
    2,322
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I got my picture back. the <script> tag ended in /> so I changed it to not have an ender tag and just gave it a closing </script>

    I THINK I got the page to work. www.aaronmartone.com/home2.asp

    It should validate both as XHTML 1.0 Trans and CSS2 compliant.

  22. #22
    Super Ninja Monkey Travis's Avatar
    Join Date
    Dec 2001
    Location
    Sioux City, Iowa
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, I guess that means you gave up on your XHTML 1.0 Strict layout that didn't use tables?
    Travis Watkins - Hyperactive Coder
    My Blog: Realist Anew
    Projects: Alacarte - Gnome Menu Editor

  23. #23
    SitePoint Wizard aaron.martone's Avatar
    Join Date
    Feb 2003
    Location
    Florida, USA
    Posts
    2,322
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Strict? I'm not there yet. I'll stay with Transitional for now. Table-less design. DWMX is a CLUTTER doing that. Free-floating DIVS and SPANS everywhere. Impossible for me to manage.

    Gonna download the DWMX2004 Trial and see if it handles it any better.

  24. #24
    SitePoint Wizard dethfire's Avatar
    Join Date
    Aug 2000
    Posts
    2,477
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by aaron.martone
    Hmmm. If I remove this
    [code]
    <%@ LANGUAGE="VBSCRIPT" CODEPAGE="1252" %>
    in xhtml don't all attributes titles and values have to be lowercase?
    Free Science Homework Help
    http://www.physicsforums.com

  25. #25
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    They don't all have to be lowercase; since you can use the eXtensible aspect. Though in general if you are using a predefined standard DTD for example: http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd it should follow the EBNF rules which generally states those listed elements are lowercase by default though some values like 'Content-Type' don't have to be lowercase.

    Know I'm late, but to me it sounded like the pages were being served a XML - hence the mismatch <br> issue; <!ELEMENT br EMPTY> that empty element becomes <br />.

    Micro$oft Explorer also used to ship an XML Processor (MSXML) that worked upon the W3C WD not the W3C TR.
    Last edited by xhtmlcoder; Sep 16, 2003 at 05:46.


Bookmarks

Posting Permissions

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