www.webdeveloper.com
Page 5 of 11 FirstFirst ... 34567 ... LastLast
Results 61 to 75 of 152

Thread: XHTML -- Still Relevant?

  1. #61
    Join Date
    Nov 2002
    Posts
    2,632
    Quote Originally Posted by Mr Initial Man View Post
    Only to you.

  2. #62
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,734
    I was kidding. Sometimes I'll haul out the old doctypes, just so I can stick something like on a page.

  3. #63
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,734
    I've been doing some experiments and I've found a serious reason why, if you're serving a page as XHTML, you SHOULD use the XHTML 1.0 or 1.1 doctype.

    To quote my book (I was talking about XML namespaces), "Yes, this does mean that the Doctype isn't quite sufficient and can even be done away with—but without a Doctype, good luck validating your markup and you can kiss almost all your character entity references goodbye."

    Doing an experimental conversion of XHTML 1.0 to XHTML5 taught me that the hard way.

    The other major question I have is what to do with these:

    HTML Code:
    		<meta name="Book_Title" content="Website Creation in Plain English" />
    		<meta name="Section" content="Cascading Style Sheets" />
    		<meta name="Chapter" content="Font And Text" />
    		<link rel="SectionStart"href="../CSS/CSS-Intro.html" />
    		<link rel="NextSection" href="../JS/JS-Intro.html" />
    ...
    			<a rel="SectionStart" href="../CSS/CSS-Intro.html">Beginning of Section</a>
    			<a rel="NextSection" href="../JS/JS-Intro.html">Next Section</a>
    HTML5 doesn't seem to like the values of those name and rel attributes.
    Last edited by Mr Initial Man; 04-02-2012 at 03:28 PM.

  4. #64
    Join Date
    Jul 2003
    Location
    The City of Roses
    Posts
    2,503
    Quote Originally Posted by Mr Initial Man View Post
    ...if you're serving a page as XHTML, you SHOULD use the XHTML 1.0 or 1.1 doctype.
    I'll take your word on that. No doubt actually serving the page as XHTML would change a lot of things. Though, by and large, people don't do that, because then your page won't render in IE8.

    Quote Originally Posted by Mr Initial Man View Post
    The other major question I have is what to do with these... HTML5 doesn't seem to like the values of those name and rel attributes.
    Do you know of any practical reason to keep them? Or were you inserting code just because it was valid?
    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";

  5. #65
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,734
    Quote Originally Posted by Jeff Mott View Post
    I'll take your word on that. No doubt actually serving the page as XHTML would change a lot of things. Though, by and large, people don't do that, because then your page won't render in IE8.
    I tried it as an experiment, and got an "undefined entity reference" in FireFox. I can't believe it took until IE9 for XHTML to be supported. If only it had done this even 6 years ago when XHTML was still... at least warm.



    Quote Originally Posted by Jeff Mott View Post
    Do you know of any practical reason to keep them? Or were you inserting code just because it was valid?
    I have a PHP program that goes through my pages and builds an outline. "<meta name="Section" content="[section name]" />" lets it know when a new section is starting. The rest, well, I thought the info would be of actual help.
    Last edited by Mr Initial Man; 04-02-2012 at 04:29 PM.

  6. #66
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    When you say that HTML5 doesn't like them, do you mean you're seeing rendering issues? Or validation issues?

    If it's just a validation issue, I'd say, who cares? If the browser sees an attribute it doesn't recognize, it won't through a fit like the validator does. It'll just ignore it. Or, if you really want to be a stickler for the rules and you're preprocessing the page with PHP anyway, just strip the problem attributes out when the page is being assembled for the browser. And how you go about differentiating between the browser and your PHP scripts -- depends on your site architecture, I'd say.


    ADDENDUM: But personally, I've left non-spec attributes tags on "business critical" pages for server-side use without any repercussions. Pages that've been the landing page for large marketing efforts, event registration, etc. I have yet to get a call or an email from someone b/c the page doesn't validate or render correctly.
    Last edited by svidgen; 04-02-2012 at 04:36 PM.

  7. #67
    Join Date
    Nov 2002
    Posts
    2,632
    Quote Originally Posted by Mr Initial Man View Post
    IHTML5 doesn't seem to like the values of those name and rel attributes.
    HTML 5 is all about using the minimal amount of code.

  8. #68
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    Quote Originally Posted by spufi View Post
    HTML 5 is all about using the minimal amount of code.
    Wait, what? You think that's what HTML5 is all about?

  9. #69
    Join Date
    Jul 2003
    Location
    The City of Roses
    Posts
    2,503
    Quote Originally Posted by Mr Initial Man View Post
    I have a PHP program that goes through my pages and builds an outline. "<meta name="Section" content="[section name]" />" lets it know when a new section is starting. The rest, well, I thought the info would be of actual help.
    The parts that your PHP program uses, you can leave in, and ignore the validator errors. Remember that the validator is a tool to help you find mistakes. If you know that the errors it reports are not mistakes, then you can safely ignore them.

    That being said, there are probably easier ways to feed data to your PHP script than HTML meta tags. It may be worth your while to explore other implementation options.
    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";

  10. #70
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,734
    Quote Originally Posted by spufi View Post
    HTML 5 is all about using the minimal amount of code.
    HTML Code:
    <!DOCTYPE html>
    <meta charset="utf-8">
    <title>My First Page</title>
    <pre>HELLO WORLD!
    
    *Welcome!* This is my -first- webpage!
    
    It's a fairly simple webpage, but it -is- a complete webpage.</pre>
    So I have achieved HTML5 mastery?

    Quote Originally Posted by svidgen View Post
    Wait, what? You think that's what HTML5 is all about?
    I agree, the above example may be emphasizing lean code a tad much. Completely valid, though!

    Quote Originally Posted by Jeff Mott View Post
    That being said, there are probably easier ways to feed data to your PHP script than HTML meta tags. It may be worth your while to explore other implementation options.
    What would you suggest? The way I've got the program set up, it opens each page in series (that series is defined by the <link rel="next"> tags; I only have to tell the program where to start).

    Quote Originally Posted by svidgen View Post
    If it's just a validation issue, I'd say, who cares?
    I do. If I publish this on a CD as a series of pages, I'd like to be able to stick those pretty little badges on each chapter so that whoever looks at my code is not led astray. If they want to create non-complying pages, that's fine (in fact, in one chapter, I say validation is not everything, and the demonstration of that is a completely valid and equally horrible webpage). But I've had a course where the examples WEREN'T properly done, and it got in the way of me learning. Drove me CRAZY. So, if nothing else, at least THIS series of webpages will be completely valid. I hope that makes sense.
    Last edited by Mr Initial Man; 04-03-2012 at 01:33 AM.

  11. #71
    Join Date
    Apr 2012
    Posts
    0
    HI ! i am one of the lovers of jquery. Jquery is not for amateurs. May be i am not able to use good coding standard but lot of my seniors are also interested in jquery.

  12. #72
    Join Date
    Jul 2003
    Location
    The City of Roses
    Posts
    2,503
    Quote Originally Posted by Mr Initial Man View Post
    What would you suggest? The way I've got the program set up, it opens each page in series (that series is defined by the <link rel="next"> tags; I only have to tell the program where to start).
    My first thought was that since you're already manually coding the hierarchy in the form of meta tags, I wonder if there's any reason you couldn't manually code the outline itself instead?

    But if there's some reason I'm not aware of why that wouldn't work, then you could also define the book's hierarchy as a JSON data structure:

    Code:
    {
        "title": "Website Creation in Plain English",
        "sections": [
            {
                "title": "Beginning",
                "chapters": [
                    "Prologue",
                    "Intro"
                ]
            },
            {
                "title": "Cascading Style Sheets",
                "chapters": [
                    "Value Types",
                    "Intro"
                ]
            }
        ]
    }
    Or, alternatively, the increasingly popular YAML format:

    Code:
    title: Website Creation in Plain English
    sections:
        - title: Beginning
          chapters:
              - Prologue
              - Intro
              
        - title: Cascading Style Sheets
          chapters:
              - Value Types
              - Intro
    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. #73
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,734
    Quote Originally Posted by Jeff Mott View Post
    My first thought was that since you're already manually coding the hierarchy in the form of meta tags, I wonder if there's any reason you couldn't manually code the outline itself instead?

    But if there's some reason I'm not aware of why that wouldn't work, then you could also define the book's hierarchy as a JSON data structure:

    Code:
    {
        "title": "Website Creation in Plain English",
        "sections": [
            {
                "title": "Beginning",
                "chapters": [
                    "Prologue",
                    "Intro"
                ]
            },
            {
                "title": "Cascading Style Sheets",
                "chapters": [
                    "Value Types",
                    "Intro"
                ]
            }
        ]
    }
    Or, alternatively, the increasingly popular YAML format:

    Code:
    title: Website Creation in Plain English
    sections:
        - title: Beginning
          chapters:
              - Prologue
              - Intro
              
        - title: Cascading Style Sheets
          chapters:
              - Value Types
              - Intro
    With the way I have it, I parse the XHTML page (as XML), seeking out <h1> - <h6> elements, and build my outline from that. It's, um... huge.

    Furthermore, if I edit a page, I can rerun the program and rebuild the outline to reflect the changes.

  14. #74
    Join Date
    Jul 2003
    Location
    The City of Roses
    Posts
    2,503
    In that case, you could still use JSON or YAML to define the relationships between sections and chapters (instead of meta tags), and still parse each page for subheadings.
    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";

  15. #75
    Join Date
    Sep 2004
    Location
    At the corner of WALK and DONT WALK
    Posts
    1,734
    Quote Originally Posted by Jeff Mott View Post
    In that case, you could still use JSON or YAML to define the relationships between sections and chapters (instead of meta tags), and still parse each page for subheadings.
    So how do I put that in the HTML code itself?

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