Coffeehouse Thread

16 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

To Scott Guthrie

Back to Forum: Coffeehouse
  • User profile image
    W3bbo

    (Because you don't have an "email" link in your profile Wink )

    I'm currently watching the most interview (the 50:32 one) and I've noted a few things:

    a) For a document to be truly valid, the <?xml declaration has to be on the first line of the outputted code, when you have:

    %>
    <?xml

    Then the <?xml dec appears on the second line, the correct method is:

    %><?xml

    Although this isn't that important, since IE ignores the <?xml dec anyway Wink

    But the other majorly important thing is that Trident only uses "semi-standards" mode over quirks mode when the <!DTD> dec appears on the first line. The code in the video (which is the default page template) shows the dec on the 3rd line, so IE would ignore it and thus use the subtractive box model. (a Very Bad Thingtm)


    Another thing deals with XHTML compliance. Whilst the supposed compliance is commendable, parts of it aren't fully semantic.

    For instance, <button type="submit">Text</button> is preferred over <input type="submit" value="text" />, and I understand that some of the controls use a table element for layout purposes.

    Here's some more errata I found:

    At 18:57 in the video, when you changed the "text" property of the button, I noticed that the value: "Push me again" wasn't fully delimited

    A lot of the "new" advertised features, such as the 'element explorer' at the bottom of the screen and selection persistence between modes, as well as "not FUBARing your code" has been standard in other editors for years. The only thing missing now is the reporting and testing tools from FrontPage, a link checker would be useful, right now I do rely on Dreamweaver a lot.

    I notice use of the word "tag" in place of "element" Wink

    Is the HTML4.01 on the DTD drop-down 4.01 Transitional or 4.01 Strict?

    When you said "<img src="foo.jpg" />" is valid HTML... wrong Tongue Out it's "consistently working HTML" yes... but it isn't valid, it has to have the alt="" attribute.

    AFAIK, the alt="" attribute is always required, you cannot substitute longdesc="" in its place.

    Besides, <object type="image/jpeg" src="">Alternative media here</object> is better Wink Shame Trident doesn't support it

    When you resized that table cell, what code did it add? the "width=""" attribute, or did it add an inline CSS attribute?

    Is it too late to ask for element-specific coloring? I like my anchors in green, tables in turquise, and images in purple.

    Hows Intellisense for "Classic" ASP3.0? In VS2003 it detects, for example Scripting.FileSystem object... but not ADODB.Recordset, for example.

    ASP.Net hasn't been around much, how much longer can you expect the innovation to continue before it stagnates and turns into another MS Office?

    And the million-dollar question:

    When will we see URI Rewriting and Content Negociation built-in to IIS? Wink

    Regards
    -W3bbo

  • User profile image
    Sven Groot

    W3bbo wrote:
    When you said "<img src="foo.jpg" />" is valid HTML... wrong it's "consistently working HTML" yes... but it isn't valid, it has to have the alt="" attribute.

    Even with the ALT attribute, it's not valid HTML. It's valid XHTML, yes, but in HTML the short-hand empty tag format is not allowed and img isn't allowed to have an end tag at all. As long as that / is there, it may be compatible with every HTML client out there, but it's not technically valid HTML.

  • User profile image
    W3bbo

    It is valid HTML

    Because in SGML, the "/>" bit is taken as: "attribute '/' with null value", and the HTML DTD allows for the "/" attribute for XHTML compatibility.

  • User profile image
    Sven Groot

    W3bbo wrote:
    It is valid HTML

    Because in SGML, the "/>" bit is taken as: "attribute '/' with null value", and the HTML DTD allows for the "/" attribute for XHTML compatibility.

    I remember reading somewhere that it isn't, but I did some checking and you're right.

    Strangely enough, this means that <img src="whatever.jpg" / alt="test"> is also valid HTML but obviously not valid XHTML. Perplexed

  • User profile image
    W3bbo

    Sven Groot wrote:
    Strangely enough, this means that <img src="whatever.jpg" / alt="test"> is also valid HTML but obviously not valid XHTML.


    Nah...

    It's exactly the same as the boolean attributes in HTML3.2

    <option value="x" selected>Text</option>

    Rather than the revised method for XHTML

    <option value="x" selected="selected">Text</option>

    Don't let its nonalphanumericism put you off Wink

  • User profile image
    Sven Groot

    W3bbo wrote:
    Sven Groot wrote: Strangely enough, this means that <img src="whatever.jpg" / alt="test"> is also valid HTML but obviously not valid XHTML.


    Nah...

    It's exactly the same as the boolean attributes in HTML3.2

    Yes, I know. But just as you can put the selected attribute anywhere you can also put the / attribute anywhere. But in XHTML the / is only valid at the end of the tag.

  • User profile image
    W3bbo

    Sven Groot wrote:
    Yes, I know. But just as you can put the selected attribute anywhere you can also put the / attribute anywhere. But in XHTML the / is only valid at the end of the tag.


    Well not strictly speaking, no.

    In XHTML, the "/>" is treated as a single node component, the "element delimiter", thus, a good parser would process the standalone "/" as a null attribute, maybe throw an XML warning, but otherwise ignore it.

    But yes, in a way the "/" is only really valid at the end of the element delimiter.

    Although according to the rules of SGML and XML, an DTD attribute with a name containing "/" is valid, but it would confuse a lot of people Wink

  • User profile image
    Sven Groot

    W3bbo wrote:
    Sven Groot wrote: Yes, I know. But just as you can put the selected attribute anywhere you can also put the / attribute anywhere. But in XHTML the / is only valid at the end of the tag.


    Well not strictly speaking, no.

    In XHTML, the "/>" is treated as a single node component, the "element delimiter", thus, a good parser would process the standalone "/" as a null attribute, maybe throw an XML warning, but otherwise ignore it.

    But yes, in a way the "/" is only really valid at the end of the element delimiter.

    Although according to the rules of SGML and XML, an DTD attribute with a name containing "/" is valid, but it would confuse a lot of people

    But attributes without value aren't allowed, so you'd still need to put /="something". A lonely slash can only occur at the end of the element tag, or at the beginning or an end element.

    EDIT: MSXML at least doesn't allow an attribute named '/':
    The character '>' was expected. Error processing resource 'file:///C:/Documents and Settings/Sven Groot/Desktop/test.xml'. ...
    <test /="hello" whatever="something">Hello there</test>
    -------^

  • User profile image
    irascian

    Hear! Hear!

    It's nearly two years since "we're going to do XHTML properly" was first touted for Whidby but having been over-sold and over-hyped on every release of Visual Studio since the first release of Visual InterDev only to find real pain when the product gets used in the real world I suspect we're in for disappointment again (maybe I'm just over-reacting to the way the specific XHTML questions in the video thread were ignored and others were answered).

    I really want to get excited about Whidby and the video looked great and showed some good stuff (albeit a lot of that's been there in products like Dreamweaver, WebSphere or Eclipse for some time now) but until issues like all those brought out above are dealt with honestly instead of the usual Microsoft over-enthusiastic smoke and mirrors I'm going to assume this is NOT the xhtml solution Microsoft keep telling us it is.

    PLEASE prove my cynicism wrong!

    Ian

  • User profile image
    scottgu

    Hi W3bbo,

    A few comments on your questions/comments above:

    But the other majorly important thing is that Trident only uses "semi-standards" mode over quirks mode when the <!DTD> dec appears on the first line. The code in the video (which is the default page template) shows the dec on the 3rd line, so IE would ignore it and thus use the subtractive box model. (a Very Bad Thingtm)

    The <!DTD> output ends up being the first line of markup content output by the .aspx page (since the <%@ Page %> directive is processed server side and does not generate any output).  I'm looking into whether whitespace/line-breaks are used by IE based on your comment though -- i hadn't heard of that before and so might be something we need to change in the default template.

    For instance, <button type="submit">Text</button> is preferred over <input type="submit" value="text" />, and I understand that some of the controls use a table element for layout purposes.

    The <asp:button> control outputs the value as an attribute by default.  You can, however, use the html element directly and apply a runat="server" attribute to store the text between the opening and closing elements (this control gives you exact control over the html output).  Note that both approaches are XHTML legal... <g>

    At 18:57 in the video, when you changed the "text" property of the button, I noticed that the value: "Push me again" wasn't fully delimited

    Can you explain what you mean by this one?  I'm not sure what you mean by not fully delimited?  It could just be that the video didn't catch it clearly -- but I don't think there was any errors there.

    Is the HTML4.01 on the DTD drop-down 4.01 Transitional or 4.01 Strict

    The HTML4.01 in the drop-down list is 4.01 Transitional.  We do have XHTML Transitional and Strict -- but haven't seen as much demand for 4.01 strict.  As I mentioned in the video, it is easy to create your own validation/intellisense schemas (they are just XSD files that we read on tool startup).  My sense is that we'll see a lot of communities support different schemas and optimized browsers/standards ship on the web once we ship.

    When you said "<img src="foo.jpg" />" is valid HTML... wrong it's "consistently working HTML" yes... but it isn't valid, it has to have the alt="" attribute.

    Technically it depends on what HTML schema you are validating against.  I believe for HTML 3.2 it is technically legal to not have a alt attribute (although bad practice).  For HTML 4.01 (including transitional), it is illegal. 

    Our intellisense validation engine will flag an <img> that does not have an alt attribute with a red-squigly indicating an error regardless of whether you run the accessibility checker when you have HTML 4.01 selected.  For HTML 3.2 we won't flag it as an error until you run the accessibility checker.

    AFAIK, the alt="" attribute is always required, you cannot substitute longdesc="" in its place.

    Technically it depends on the schema you are validating against.  You cannot be legal with HTML 4.01 without the alt="" attribute, but you can be legal with other html standards and still be accessibility compliant if you have the longdescr= attribute (note: our html 4.01 and xhtml schemas always promote usage of the the alt="" attribute -- so this is a fairly esoteric point).

    As an aside -- one annoying thing is that the accessibility rules defined by 508 and especially WCAG are sometimes at odds with the guidelines defined by the HTML and XHTML commitees.  This seems to be epecially true round suggested usages of client-side script.

    When you resized that table cell, what code did it add? the "width=""" attribute, or did it add an inline CSS attribute?

    We generate CSS in this case.  Our designer shouldn't ever be generating deprecated markup anymore (no width attributes or <font> tags).

    Is it too late to ask for element-specific coloring? I like my anchors in green, tables in turquise, and images in purple.

    It is too late to ask for new features.

    But thankfully we already added support for this and it is already in the product.  Wink  You can control both the foreground and background colors of any element now.

    Hows Intellisense for "Classic" ASP3.0? In VS2003 it detects, for example Scripting.FileSystem object... but not ADODB.Recordset, for example.

    The intellisense engine for "classic" ASP hasn't been enhanced signficiantly.  You pick up many of the new markup features for free, and the project system is now much more flexible (no need to add files to the project in order for them to show-up).  But I don't think there is any additional support for doing late-bound intellisense of script based on COM object type.

    We do, though, now support intellisense for <% %> and server-side code blocks for ASP.NET pages.  If you use VB instead of VBScript you'll get full intellisense.

    ASP.Net hasn't been around much, how much longer can you expect the innovation to continue before it stagnates and turns into another MS Office?

    We've added thousands of new features in ASP.NET 2.0 over 1.x (which I think was itself very innovative).  I think anyone who looks at 2.0 will leave very, very impressed.  We plan to continue innovating away the next several releases as well.

    When will we see URI Rewriting and Content Negociation built-in to IIS?

    I did a talk a few weeks back on Channel 9 where i spent a little bit of time talking about some of the new things in IIS7.  It is a major, major upgrade and now supports a rich extensibility architecture that makes scenarios like the ones you listed above (and hundreds more) now really easy.

    Hope this helps,

    Scott

    P.S. My email address is scottgu@microsoft.com


  • User profile image
    W3bbo

    Hi Scott

    Great to hear about the element-specific coloring, that was one of the main reasons I still use Dreamweaver a bit.

    Overall: Good good... nice to see Microsoft stick to non-Microsoft standards Wink

    IRT the template

    <!-- Added -->

    I could swear that IE6 didn't do that before SP2.

    I'm guessing they patched IE6's DTD sniffing in SP2, I remember having problems with IE6 if the DTD wasn't on the first line

    Either way... just to be on the safe side, can you change the default template so it appears like this: (note the bold bit)

    <%@ Page Language="vb" AutoEventWireup="true"
    %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>

  • User profile image
    W3bbo

    scottgu wrote:
    When will we see URI Rewriting and Content Negociation built-in to IIS?


    I did a talk a few weeks back on Channel 9 where i spent a little bit of time talking about some of the new things in IIS7.  It is a major, major upgrade and now supports a rich extensibility architecture that makes scenarios like the ones you listed above (and hundreds more) now really easy.


    To be honest, I am disappointed with your response here. I was asking for information on a specific feature, and instead I'm essentially told "go off and buy one or develop one, we're not going to provide this feature for you"

    Virtually every signle webserver out there, Apache inclusive, offers some form of ContentNeg and URI rewriting, why should I pay for an ISAPI or module for IIS or develop one myself when I can get it for free from another server platform?

  • User profile image
    sbc

    W3bbo wrote:

    Either way... just to be on the safe side, can you change the default template so it appears like this: (note the bold bit)

    <%@ Page Language="vb" AutoEventWireup="true"
    %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>

    You get even more issues when you add user controls and Import namespaces, as that adds even more line breaks:
    
    <%@ Page Language="vb" AutoEventWireup="true" %>
    <%@ Register TagPrefix="MyTags" TagName="MyTag" src="mycontrol.ascx" %>
    <%@ Import Namespace="My.Namespace" %>
    

    ASP.NET needs to be able to ignore (i.e. not output) linebreaks before <!DOCTYPE (if it is present). Is that even technically possible?

  • User profile image
    W3bbo

    sbc wrote:
    You get even more issues when you add user controls and Import namespaces, as that adds even more line breaks:


    <%@ Page Language="vb" AutoEventWireup="true" %>
    <%@ Register TagPrefix="MyTags" TagName="MyTag" src="mycontrol.ascx" %>
    <%@ Import Namespace="My.Namespace" %>

     

    ASP.NET needs to be able to ignore (i.e. not output) linebreaks before <!DOCTYPE (if it is present). Is that even technically possible?


    I don't know about you... have I haven't had any issues with that.... yet.

    I mean, see here the source code correctly has the DTD on the first line.

    But the ASPX behind it is:

    <%@ Page Language="vb" AutoEventWireup="true" %>
    <%@ Register Tagprefix="Sc" Tagname="NavBar" Src="Navbar.ascx" %>
    <%@ Register Tagprefix="Sc" Tagname="Footer" Src="Footer.ascx" %>
    <script runat="server">
    Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            navbar.Selected = 0
    End Sub
    </script><!DOCTYPE html PUBLICetc...

  • User profile image
    eagle

    Scott loged-on C9 yesterday at 5pm EST.

  • User profile image
    W3bbo

    eagle wrote:

    Scott loged-on C9 yesterday at 5pm EST.



    Eagle: Read the thread, you'll notice he's posted a response already Smiley

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.