Author Topic: Question about strict in html_spec_xml  (Read 2491 times)

Offline trdunsworth

  • Registered User
  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
  • The Professional Heretic
    • View Profile
Question about strict in html_spec_xml
« on: August 08, 2011, 11:49:55 pm »
Hey Alex,

I have a question. I'm taking apart the html_spec_xml file as well as the html_user_xml file to build an HTML5 compatible file (I want to do CSS3 after that, so I will be a busy boy). However, I noticed the strict = "false" on both the body and title scopes. Am I reading the strict information correct that if strict = "false" then the parser won't complain if title and body are both left open without a closing tag?

If that is the case, that would lead to a developer writing invalid code. Would that be better for strict="true" for html, head, body, and title at the very least?

Thanks
Tony

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2169
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Question about strict in html_spec_xml
« Reply #1 on: August 09, 2011, 02:35:17 am »
Hi Tony,

you understood meaning of the strict right. I do not exactly remember the reason why title and body got strict="false", but probably because:
- I have often seen used empty <body/> tag and by spec, closed tag for body is not required...
- for title, probably, reason was usage of title as attribute name in <a ...> tag. Because outlining parser currently does not take into account position of the title inside tag, usage of title in <a> will lead to unresolved close title. I would say this is current limitation.

As far as I see, in standard version of spec not html not head scopes has strict set to false. So, both strict="true".

If you will write specs for HTML5/CSS3, try to extend existing html_spec/css_spec (inherit). If it is necessary I can update default spec and help you with definitions/validation. 

And normally for a new spec you get a free license, if you are not registered user yet.

Best regards,
Alex.

Offline trdunsworth

  • Registered User
  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
  • The Professional Heretic
    • View Profile
Re: Question about strict in html_spec_xml
« Reply #2 on: August 09, 2011, 11:32:03 pm »
Alex,

Thanks for confirming that for me. I was going to write the body, head, and html with strict = true. I am going to be careful about title since it is both a tag and an attribute.

I will do what I can on the html_spec and css_spec. Will certainly ask questions if I'm not certain of something.

I've already gotten a free license for blogging about the software and advertising that I use it on my site. No worries there. Just doing this now for the fun of it. Keeps me thinking and coding on stuff for fun.

 :D

Cheers,
Tony

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2169
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Question about strict in html_spec_xml
« Reply #3 on: August 10, 2011, 02:32:27 am »
you can try, as far as I have checked, there will be no problems for cases except of title.
What I meant is not to update html_spec or css_spec but creating of the html5_spec which will inherit html_spec and extend it, for example. This will allow to user switch from HTML4 and HTML5, if this scenario needed of course...

Offline trdunsworth

  • Registered User
  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
  • The Professional Heretic
    • View Profile
Re: Question about strict in html_spec_xml
« Reply #4 on: August 10, 2011, 09:37:57 pm »
No worries, I will do the inheritance routine as it will work easier as far as I'm aware. Sorry for the confustion. ::)

 

Related Topics

  Subject / Started by Replies Last post
7 Replies
4910 Views
Last post August 04, 2009, 01:24:53 pm
by alex
3 Replies
1876 Views
Last post September 06, 2009, 08:23:25 pm
by alex
3 Replies
1547 Views
Last post June 24, 2011, 10:52:42 pm
by alex
1 Replies
1446 Views
Last post February 04, 2013, 10:22:27 am
by alex
1 Replies
1151 Views
Last post October 14, 2014, 11:56:32 am
by alex