SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Threaded View

  1. #1
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,278
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)

    Trying to read the specs

    I'm having a Stomme Poes moment-- feeling like our cat when it gets extra stupid.

    First, I cannot actually find the real XHTML specs as when you look for them you get this document stating basically that you should read HTML4 except this, that and the other: http://www.w3.org/TR/xhtml1/

    But I found a bloggity blog-blog-blog-dog with an actual list (from where he got it, I dunno):
    <!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>
    Compare this with the HTML4 one, which you can read on the HTML4 spec page:
    <!ELEMENT FIELDSET - - (#PCDATA,LEGEND,(%flow;)*) -- form control group -->
    Even reading Tommy's Art of Reading the DTD I'm getting something not matching and it's confuzling.

    The | (pipe) symbol means "or" (I'm assuming a boolean "or"). So for XHTML it's saying one can have in a form
    -parsed character data or
    -a legend or
    -a block element or
    -another form! or
    -an inline element or
    -something else

    but as far as I know, forms are NOT allowed to contain other forms at all, not as direct children, not as descendants, not at all:
    Quote Originally Posted by section B
    form
    must not contain other form elements.
    So what does the above mean? How should I read it?

    Also, while the HTML4 DTD requires legends after fieldsets, I can send an XHTML 1.0 form to the validator and it doesn't say anything if there's a fieldset without a legend. Yet this is not listed as a difference on the XHTML1 W3C page, and I've been told that in fact a legend WAS still required but that a validator bug misses it. Which doesn't sound right. It seems they've changed it. The DTD listing above for XHTML forms is very different from the HTML4 one.

    So which is it, am I reading the listing for XHTML wrongly, or what? I only found the form one listed in the blog, but cannot find the listing for fieldset anywhere (I can't load a .dtd page in my browser... I'm going to try to copy it and save as text).
    Last edited by Stomme poes; Feb 17, 2009 at 07:53. Reason: smilies must die


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
  •