Question about strict in html_spec_xml

Started by trdunsworth, August 09, 2011, 12:49:55 AM

Previous topic - Next topic

trdunsworth

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

alex

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.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

trdunsworth

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

alex

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...
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

trdunsworth

No worries, I will do the inheritance routine as it will work easier as far as I'm aware. Sorry for the confustion. ::)