www.webdeveloper.com
Page 8 of 11 FirstFirst ... 678910 ... LastLast
Results 106 to 120 of 152

Thread: XHTML -- Still Relevant?

  1. #106
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,733
    I'm afraid you are, Svidgen, and I will demonstrate that point. Here are two pages in XHTML5 with nearly identical coding:

    http://mrinitialman.com/Books/hsl-xhtml5-good.xhtml
    http://mrinitialman.com/Books/hsl-xhtml5-bad.xhtml

    The only difference is that the first uses ° and — for character references, the second uses the easier-to-remember ° and —. Guess which page actually works and which gives you an XML parsing error.

    The issue I take with some developers is that they think that, with HTML5, the doctype has become vestigial and unneeded. But it actually has a very real function when it comes to XML--which is REQUIRED when you want to mix HTML5 with any other language, such as SVG.
    Last edited by Mr Initial Man; 04-14-2012 at 06:57 PM.

  2. #107
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    My statement was that the HTML5 doctype will allow you to use the standard entities. leap to assume the conversation should naturally apply to XML document: not the case. The broader point: the only doctype you need is the generic html doctype, when served as HTML.

    Given that these pages are being served as XML, you're stuck using the entities defined by the XML standard in lieu of what I'd call a "distinct" doctype.

    Remember, XML aims at merciless, verbose, explicit unambiguity. Anything that's not explicitly defined will naturally be invalid. The HTML-SGML family, on the other hand, is aimed at a merciful, artistic, interpretation. You can expect to be able to make mistakes, use expired tags, tags and attributes that have never been defined, and even markup that doesn't make sense and still have a document that renders 'as best it can.'

  3. #108
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,733
    My point is that the Doctype and DTD are not needless, as the HTML5 crowd seems to be trumpeting--sure, it's vestigial in HTML pages, but with Internet Explorer FINALLY supporting XHTML, Doctypes and DTDs still have relevance.

  4. #109
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    Quote Originally Posted by Mr Initial Man View Post
    But it actually has a very real function when it comes to XML--which is REQUIRED when you want to mix HTML5 with any other language, such as SVG.
    You can embed SVGs (and other "languages") directly into HTML5 without serving it as XML.

    Notice how the following SVG is embedded inline in the "HTML5" document here: http://staging.thepointless.com/svg_demo

    HTML Code:
    <svg xmlns="http://www.w3.org/2000/svg" version="1.1">
      <circle cx="100" cy="50" r="40" stroke="black"
      stroke-width="2" fill="red"/>
    </svg>
    I vaguely recall already mentioning in this thread ... And I vaguely recall you ignoring that point the first time I mentioned it. Please don't ignore the point this time.

  5. #110
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    Quote Originally Posted by Mr Initial Man View Post
    My point is that the Doctype and DTD are not needless, as the HTML5 crowd seems to be trumpeting--sure, it's vestigial in HTML pages, but with Internet Explorer FINALLY supporting XHTML, Doctypes and DTDs still have relevance.
    Sorry, and I don't mean to insult you, but your point is plain silly. Don't ignore the point that the "HTML5 doctype" is more than sufficient for everything you've suggested you need XHTML for. Plus, serving your content as something other than XML allows the browser to be more forgiving when it parses the markup.

  6. #111
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,733
    ...

    *Brain goes clunk.*

    You mean to say that you can mix SVG with HTML5 instead of XHTML5?

  7. #112
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    ... More to the point, I think you're misrepresenting the statements of the "HTML5 trumpeters." They're not saying doctype is useless. They're saying a "vague" doctype sufficiently accomplishes everything you need to accomplish.

    And they're right. Going out on a limb here, I'd say this is the only doctype any current web development project needs:

    HTML Code:
    <!doctype html>

  8. #113
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    Quote Originally Posted by Mr Initial Man View Post
    ...

    *Brain goes clunk.*

    You mean to say that you can mix SVG with HTML5 instead of XHTML5?
    ... Yes? If you follow the link, you'll see it's served as regular old HTML. The MIME type is text/html. There's not xml header. And the doctype is the generic html one (the "HTML5 doctype").

  9. #114
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,733
    So in other words, everything I have learned about XML is worthless. Thanks for letting me know.

  10. #115
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    Quote Originally Posted by Mr Initial Man View Post
    So in other words, everything I have learned about XML is worthless. Thanks for letting me know.
    Not necessarily. You can still adhere to many XML standard to simplify markup generation and parsing in some cases. And the properties of XML are very useful, if not critical, for web services. Familiar at all with soap services?

  11. #116
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,733
    None beyond what the hotels offer.

  12. #117
    Join Date
    Jul 2003
    Location
    The City of Roses
    Posts
    2,503
    Quote Originally Posted by Mr Initial Man View Post
    So in other words, everything I have learned about XML is worthless. Thanks for letting me know.
    Unfortunately this sort of thing happens in our industry. I remember when I was an expert on all things Perl. Then PHP came along, and Perl became insignificant. I know how demoralizing it can feel when the wealth of knowledge you've accumulated suddenly seems worthless. You need to fight to stay positive, and find the motivation to learn your craft over again. When you find that motivation, flip open the HTML5 draft and read it cover to cover to maintain your status as an expert on the latest and greatest.
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

  13. #118
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    Quote Originally Posted by Mr Initial Man View Post
    None beyond what the hotels offer.
    Whelp. If you do any inter-application .NET coding, you'll likely find you depend a great deal on SOAP services. You won't necessarily need to be familiar with XML to take advantage, but it comes in handy to know a few things come debugging time -- or if you need (or find it easier) to hand-craft any requests for any reason.

  14. #119
    Join Date
    Jan 2011
    Posts
    123
    Quote Originally Posted by Mr Initial Man View Post
    Ooooooooooooookay, where'd you read that? Citation please.



    You see, what some people don't seem to realize--right up until they work with XML--is that the Document Type Definition performs a very important function that has never been performed by anything else, not schemas, not the HTML5 doctype.

    HTML Code:
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
    	<!ENTITY deg "&#x00B0;">
    	<!ENTITY oq "&#x201C;">
    	<!ENTITY cq "&#x201D;">
    ]>
    That's an SVG 1.1 Doctype that I used in a page--but do you see something odd about it? Here's the original:
    Code:
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

    Here's the one I used:
    Code:
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
    	<!ENTITY deg "&#x00B0;">
    	<!ENTITY oq "&#x201C;">
    	<!ENTITY cq "&#x201D;">
    ]>
    Character Entity References!

    XHTML 1.0 links to a document type definition, which defines these,;XHTML5 does NOT, so you have to go through the effort of memorizing their numerical equivalents or skip any characters you can't type on your keyboard altogether.

    Doing something like
    HTML Code:
    <!DOCTYPE html [<!--CERs Here-->]>
    will cause the validator to throw errors, because now it's expecting the COMPLETE document type definition (I've written them. Even ElementML was surprisingly long). SVG has no character entity references, but because of its doctype's structure I was able to add some in.

    HTML5's doctype doesn't allow that, and if you don't have a doctype at all, you're out of luck. Oh, I know, "You don't need a doctype" and yadda yadda yadda, but here's a point I made in my book:

    1. &#x221A;
    2. &radic;


    They all amount to the same thing, but which do you want to use for writing "(X)HTML5=√(All Headaches)"?
    Exactly!
    First thing people should learn about HTML, is that:
    >>HTML, is NOT XHTML!

    and you simply haven't "recorded' a single word I was saying....
    as I was making the absolutely opposite point of what you are replying to.

  15. #120
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,733
    Look, it hadn't sunk in until Svidgen explained it to me that SVG could be mixed with HTML5, not just XHTML5. Doctypes and DTDs are still the only way of getting Character Entity References into an XML document; that's the point I was making.

    Quote Originally Posted by Jeff Mott View Post
    ...flip open the HTML5 draft and read it cover to cover to maintain your status as an expert on the latest and greatest.
    Ehhh, what's the point? Might as well delete the whole book and be done with it.
    Last edited by Mr Initial Man; 04-14-2012 at 11:59 PM.

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