SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 33 of 33
  1. #26
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    deathshadow60
    Actually, in HTML (up to and including HTML 4.01), a / will close the latest tag left open. One example would be the following:
    Code html4strict:
    <p/This is a paragraph/
    <p/This is another paragraph/
    <!-- ignore the following code - SitePoint is having problems with null end tags, it seems ;) -->
    >>
    This is equivilant to the following:
    Code html4strict:
    <p>This is a paragraph</p>
    <p>This is another paragraph</p>
    The disadvantage is, of course, that you can't use a / without escaping it.

    Since the > doesn't have to be escaped, unlike the < and the &, this syntax:
    Code html4strict:
    <p/> means greater than/
    is equivilant to
    Code html4strict:
    <p>> means greater than</p>

    There are also other SGML shorthand methods. A few examples can be seen in my signature, which is equivilant to:
    Code html4strict:
    <p><strong><abbr>HTML</abbr> 4 teh win</strong></p>
    <p>In Soviet Russia, website codes you!</p>

    Unfortunately, no mainstream user agents actually conform to this. Still, the official HTML validator will correctly validate such shorthand syntax.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  2. #27
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Where is that in the specification because

    1) that makes no sense whatsoever, because if so why isn't the > being shown...

    2) what on earth #DDD would have come up with something so idiotic... Oh wait, is this a SGML syntax thing?

    Doesn't seem to be in HTML 2... doesn't seem to be in 3.2... doesn't seem to be in 4.01 -- Not sure where you're getting that from...

    Unless you mean the SGML <xxx/content/ construct, which was NOT adopted into HTML to the best of my knowledge. Remember, BASED on SGML doesn't mean all SGML constructs are valid... if it did:

    <img src="image.png" </img src="image2.png">

    Would be valid.... though it is an excellent example of why SGML is rubbish and why TBL felt the need to make so many changes to it in the first place. -- though yes, 4.01 tried to be more SGML compliant and for true 4.01 compliance a browser should treat HTML as SGML, but since 2 and 3.2 didn't have that browser makers really didn't see the point.

    Though since "IMMEDNET" isn't set, the short / or // for fulltags would be unavailable to HTML as a SGML document, even when "SHORTTAGS" is set to yes.

    I dunno, always struck me as the same type of idiocy as opening and closing <?php ?> twenty or thirty times in a fifteen to twenty line PHP file... nonsensical gibberish mess -- it's what moved me away from HTML and to XHTML in the first place. It sure as shine wasn't for the stillborn (and rightly so) "XML application" nonsense.

    In any case, needlessly convoluted mess thanks to it's SGML legacy should you actually try to follow that.

    Question: Does Amaya obey that? I mean, it is supposed to be the 'reference browser' and all that with 100% compliance.

  3. #28
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    The reason why the >'s aren't being show is that browsers don't respect the null end tag. This is a rather unfortunate oversight. Not so much in terms of implementation of SGML shorthand in documents, as the few saved bytes means little today, but it prevents easy portability between pseudo-XHTML and other SGML documents.

    You can find the reference to implemented SGML shorthand in Appendix B.3.7 of the HTML 4.01 documentation. This is indeed valid in HTML 4.01. I don't know about earlier versions of HTML (or Amaya, for that matter).
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  4. #29
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Never noticed that in 4.01 -- of course it's in the appendix and not the normative so easy enough to miss. Be nice if stuff like that was actually in the SYNTAX part of the specification -- but of course that would make too much sense.

    Though... that's funny, that's invalid SGML according to the setting for IMMEDNET, since it's not stated and defaults to off. Those are only valid when SHORTTAG, IMMEDNET and ... gah, one other... are ALL set to on, not just SHORTTAG. It's FEATURES section in the DTD doesn't include all the triggers to make that valid...

    Strange indeed... though not the first time I've seen things in the HTML specification that contradict it's DTD.

  5. #30
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Not to mention that several example contradicts recommendations set forward in the specification. You don't want things to be too easy, now, do you
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  6. #31
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by C. Ankerstjerne View Post
    Not to mention that several example contradicts recommendations set forward in the specification. You don't want things to be too easy, now, do you
    Notice that too, have you? A lot of places it's like they just copied the HTML 3.2 examples from the long-defunct Netscape reference page without actually checking they were still valid under the new rules or fit the recommendations.

    Always good for a laugh.

    Though I do notice the nice text in that section in the appendix:
    Documents that use them are conforming SGML documents, but are unlikely to work with many existing HTML tools.
    So at least they acknowledge the issue. NOT that I see any advantage to using them -- quite the opposite in fact.

  7. #32
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,272
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Teh browsers also left out teh ==short references==
    tho looks like teh Wikies took them up : )

    ##woot tags##

  8. #33
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Off Topic:


    Quote Originally Posted by Stomme poes View Post
    Teh browsers also left out teh ==short references==
    tho looks like teh Wikies took them up : )

    ##woot tags##
    Is that a thinly veiled reference to one of my old signatures?

    "SGML is to XML as L33T is to English"


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
  •