Atlas and XHTML compliant?

Last post 09-07-2006 6:29 AM by CoolMints. 16 replies.

Sort Posts:

  • Atlas and XHTML compliant?

    03-23-2006, 7:50 PM
    • Member
      50 point Member
    • dotnetshadow
    • Member since 03-24-2006, 12:47 AM
    • Posts 10
    Hi guys

    Just been going through the atlas tutorials... I have noticed that the rendered output shows tags such the ones below: (See below example)

    This of course doesn't conform to XHTML standard such as XHTML 1.0 STrict can anyone suggest what can be done about this? Has anyone been able to validate their pages?

    Regards Dotnetshadow

    EXAMPLE:
    ========
            <script type="text/xml-script">
    <page xmlns:script="http://schemas.microsoft.com/xml-script/2005">
      <components>
        <pageRequestManager id="_PageRequestManager" updatePanelIDs="ctl00$ContentPlaceHolder1$p1,ctl00$ContentPlaceHolder1$p2" asyncPostbackControlIDs="ctl00_ContentPlaceHolder1_DropDownList1" scriptManagerID="ctl00$ContentPlaceHolder1$s1" form="aspnetForm" />
        <control id="ctl00_ContentPlaceHolder1_progress1" visibilityMode="Collapse">
          <bindings>
            <binding dataContext="_PageRequestManager" dataPath="inPostBack" property="visible" />
          </bindings>
        </control>
      </components>
    </page></script>
    <script type="text/javascript">
    </script>
  • Re: Atlas and XHTML compliant?

    03-23-2006, 10:53 PM
    • Star
      14,208 point Star
    • ScottGu
    • Member since 06-05-2002, 8:36 PM
    • Redmond, WA
    • Posts 2,004
    • AspNetTeam
      Moderator

    Actually that technically is XHTML valid -- since the contents of the <script> tag are technically ignored by the browser.

    Hope this helps,

    Scott

  • Re: Atlas and XHTML compliant?

    03-23-2006, 11:09 PM
    • Member
      50 point Member
    • dotnetshadow
    • Member since 03-24-2006, 12:47 AM
    • Posts 10
    Thanks for replying scott,

    I realised it is technically XHTML valid but the problem is that when I try against the validator it fails ... so in terms of checking for validaiton what can be done? Does this mean we can't validate with an Atlas project? Anyone know of a good XHTML Validator tha can ignore javascript?

    Regards DotnetShadow
  • Re: Atlas and XHTML compliant?

    03-23-2006, 11:23 PM
    • Member
      50 point Member
    • dotnetshadow
    • Member since 03-24-2006, 12:47 AM
    • Posts 10
    I think the solution here would be to able to inject comment tags so that w3c validator ignores this section
    <!--
    // -->

            <script type="text/xml-script">
    <!--
    <page xmlns:script="http://schemas.microsoft.com/xml-script/2005">
      <components>
        <pageRequestManager id="_PageRequestManager" updatePanelIDs="ctl00$ContentPlaceHolder1$p1,ctl00$ContentPlaceHolder1$p2" asyncPostbackControlIDs="ctl00_ContentPlaceHolder1_DropDownList1" scriptManagerID="ctl00$ContentPlaceHolder1$s1" form="aspnetForm" />
        <control id="ctl00_ContentPlaceHolder1_progress1" visibilityMode="Collapse">
          <bindings>
            <binding dataContext="_PageRequestManager" dataPath="inPostBack" property="visible" />
          </bindings>
        </control>
      </components>
    </page>
    // -->
    </script>


    I tried this and it validates now how do I put the comments in mmmm,....

    Regards Dotnetshadow

    validate
    validity
    validated
    validates
    gladiator
    Edit...
    Ignore all
    Add to dictionary
  • Re: Atlas and XHTML compliant?

    03-24-2006, 12:50 AM
    • Star
      14,208 point Star
    • ScottGu
    • Member since 06-05-2002, 8:36 PM
    • Redmond, WA
    • Posts 2,004
    • AspNetTeam
      Moderator
    I haven't tried this, but I wonder if you could put CDATA sections in?  I think that is technically the XHTML way to wrap code in script blocks.
  • Re: Atlas and XHTML compliant?

    03-24-2006, 3:14 AM
    • Member
      50 point Member
    • dotnetshadow
    • Member since 03-24-2006, 12:47 AM
    • Posts 10
    I'm not too sure what you mean since I'm new to XHTML could you give me an example of what you mean? Also the code is generated by microsoft when it renders the page do you mean override the render mode so that u can wrap a CDATA tag around the script tag?

    Regards Dotnetshadow
  • Re: Atlas and XHTML compliant?

    03-26-2006, 11:11 PM
    • Member
      88 point Member
    • ZAiNT
    • Member since 02-17-2006, 3:17 PM
    • Posts 58
    Will this be fixed in a coming release?
  • Re: Atlas and XHTML compliant?

    03-27-2006, 10:00 PM
    • Member
      50 point Member
    • dotnetshadow
    • Member since 03-24-2006, 12:47 AM
    • Posts 10

    I tried wrapping CDATA and comments around the necessary tags, although this helped with validatiing against the W3C validator, a more serious problem occurred that when the comments or CDATA was included the actual ajax stopped funcitoning because it caused a script error since

    <script type="text/xml"> doesn't accept a CDATA tag or <!-- inside it, so that's another problem so not sure what else do to. The only thing I was able to do was to create a render method that will detect when it's w3c and insert the CDATA or <!-- comment tag else just keep it rendered the way it is. I'm not sure how else to fix this techincally as Scott said it is valid to have a script tag with stuff inside but W3C validator treats this as "normal" XHTML tags which is a problem

    Regards Dotnetshadow

  • Re: Atlas and XHTML compliant?

    07-03-2006, 5:01 PM
    • Member
      37 point Member
    • DomenicDenicola
    • Member since 06-20-2006, 7:29 AM
    • Pasadena, CA
    • Posts 10
    Is this fixed in the June CTP?
  • Re: Atlas and XHTML compliant?

    07-03-2006, 5:22 PM
    No it is not, I'm trying to figure out how to workaround this same problem.
  • Re: Atlas and XHTML compliant?

    08-07-2006, 2:47 AM
    • Member
      37 point Member
    • DomenicDenicola
    • Member since 06-20-2006, 7:29 AM
    • Pasadena, CA
    • Posts 10
    How about the July CTP?
  • Re: Atlas and XHTML compliant?

    08-07-2006, 12:22 PM
    It's the same.  I tried a lot of things, but I couldn't really get it to work.  I thought that since the namespace is xmlns:script="http://schemas.microsoft.com/xml-script/2005" if I prefixed everything with "script", like <script:pageRequestManager...>.  It might validate better, but it didn't help.

    The only approach I can think of is sending a different page to the validator, but that really is cheating anyway.  I just wish this would validate, since I could get my pages to validate so nicely before.  It really seemed that asp.net got a lot better in this respect with asp.net 2.0, but now atlas seems a step backwards in compliance.
  • Re: Atlas and XHTML compliant?

    08-08-2006, 2:59 PM
    • Star
      14,208 point Star
    • ScottGu
    • Member since 06-05-2002, 8:36 PM
    • Redmond, WA
    • Posts 2,004
    • AspNetTeam
      Moderator

    I believe the next Atlas CTP will allow you to embed the generated markup as straight javascript instead of XML-script -- which would cause it to validate clean with any XHTML validator.

    Note that the markup today is technically XHTML compliant.  The issue is that the online validators aren't handling the case where you have a <script> tag with an unknown language element in it.

    Hope this helps,

    Scott

  • Re: Atlas and XHTML compliant?

    08-08-2006, 4:14 PM
    That would be great!

    I know all this extra effort to accomodate the W3 Validator is a little superfluous, and I understand that (especially when the markup is actually valid), but there are some other people who take that thing's results very seriously.

    I'm glad to see that attention is being given to this though.  I was just afraid that Atlas was too far a long to make that big of change.
  • Re: Atlas and XHTML compliant?

    08-17-2006, 7:47 AM
    • Member
      5 point Member
    • Zifiglio
    • Member since 08-17-2006, 11:29 AM
    • Posts 1

    hi, as scott suggested, wrapping up the markup xml contained within the xml-script block does the trick. For eg. The follow validates xhtml strict against the w3c validator found here : http://validator.w3.org

    scott, is this something that will make it into atlas, that is wrapping up the markup within CDATA blocks :o
    1    
    2    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    3    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
    4    <head>
    5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    6    
    7    <meta name="keywords" content="Asp.net, AsyncUI.net" />
    8    
    9    <title>www.asyncui.net test page</title>
    10   </head>
    11   
    12   <body> 
    13   <script type="text/xml-script">
    14   // <![CDATA[
    15   "http://schemas.microsoft.com/xml-script/2005">
    16     <components />
    17   </page>
    18   // ]]>
    19   </script>
    20   </body>
    21   </html>
    
     
    Alessandro Zifiglio
    http://www.AsyncUI.net
Page 1 of 2 (17 items) 1 2 Next >