Changes between Version 1 and Version 2 of Ticket #9301


Ignore:
Timestamp:
Sep 6, 2012, 11:24:11 AM (12 years ago)
Author:
Piotrek Koszuliński
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9301 – Description

    v1 v2  
    1 To be written...
     1=== Intro ===
     2
     3Googling... googling... That's right - there's no DTD for HTML5 and there won't be any, because HTML5 cannot be defined by poor DTD. There are other schema languages like RELAX NG in which HTML5 may be defined, but AFAIK WHATWG won't create schema for HTML5.
     4
     5=== Subject of this task ===
     6
     7We need to update our pseudo-DTD with HTML5's new stuff. See e.g. https://github.com/ckeditor/ckeditor-dev/pull/6
     8
     9The purpose of {{{CKEDITOR.dtd}}} is mainly to validate DOM tree structure + few more specific for editor things (like the list of editable elements). Unfortunately in current {{{CKEDITOR.dtd}}}'s format we won't be able to define HTML5's precisely.
     10
     11I see two main problems:
     12
     131. Transparent elements (http://dev.w3.org/html5/markup/terminology.html#transparent)
     14  E.g. if {{{<a>}}} is a child of {{{<div>}}}, then {{{<a>}}} may contain block elements (in HTML5's terminology - flow elements (http://dev.w3.org/html5/markup/common-models.html#common.elem.flow)) and inline elements (phrasing elements). If {{{<a>}}} is a child of {{{<p>}}}, then it may contain phrasing elements only.
     152. Nesting rules dependent on attributes/sth else.
     16  E.g. if {{{<audio>}}} doesn't have {{{src}}} attr it may contain {{{<source>}}} elements. Otherwise it may not.
     17
     18We are not able to handle 1. and I believe that we've got to live now with the current state of things. However, for 2., rules of our DTD should just be as tolerant as possible. That's the solution for now.
     19
     20=== Few interesting links ===
     21
     22* http://dev.w3.org/html5/markup/elements.html#elements
     23* http://stackoverflow.com/questions/432933/will-html-5-validation-be-worth-the-candle
     24* http://stackoverflow.com/questions/4055206/yet-another-question-regarding-the-html5-dtd-schema
     25* http://about.validator.nu/
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy