Index: /CKEditor/branches/prototype/_dev/dtd_test/dtd_test.html
===================================================================
--- /CKEditor/branches/prototype/_dev/dtd_test/dtd_test.html (revision 2343)
+++ /CKEditor/branches/prototype/_dev/dtd_test/dtd_test.html (revision 2343)
@@ -0,0 +1,81 @@
+
+
+
+
+ CKEDITOR.dtd Contents
+
+
+
+
+
+
+ CKEDITOR.dtd Contents
+
+
+
+
Index: /CKEditor/branches/prototype/_source/core/dtd.js
===================================================================
--- /CKEditor/branches/prototype/_source/core/dtd.js (revision 2343)
+++ /CKEditor/branches/prototype/_source/core/dtd.js (revision 2343)
@@ -0,0 +1,202 @@
+/*
+ * CKEditor - The text editor for Internet - http://ckeditor.com
+ * Copyright (C) 2003-2008 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ * - GNU General Public License Version 2 or later (the "GPL")
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ * http://www.gnu.org/licenses/lgpl.html
+ *
+ * - Mozilla Public License Version 1.1 or later (the "MPL")
+ * http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ */
+
+/**
+ * @fileOverview Defines the {@link CKEDITOR.dtd} object, which holds the DTD
+ * mapping for XHTML 1.0 Transitional. This file was automatically
+ * generated from the file: xhtml1-transitional.dtd.
+ */
+
+/**
+ * Holds and object representation of the HTML DTD to be used by the editor in
+ * its internal operations.
+ *
+ * Each element in the DTD is represented by a
+ * property in this object. Each property contains the list of elements that
+ * can be contained by the element. Text is represented by the "#" property.
+ *
+ * Several special grouping properties are also available. Their names start
+ * with the "$" character.
+ * @namespace
+ * @example
+ * // Check if "div" can be contained in a "p" element.
+ * alert( !!CKEDITOR.dtd[ 'p' ][ 'div' ] ); "false"
+ * @example
+ * // Check if "p" can be contained in a "div" element.
+ * alert( !!CKEDITOR.dtd[ 'div' ][ 'p' ] ); "true"
+ * @example
+ * // Check if "p" is a block element.
+ * alert( !!CKEDITOR.dtd.$block[ 'p' ] ); "true"
+ */
+CKEDITOR.dtd = (function()
+{
+ var X = CKEDITOR.tools.extend,
+
+ A = {isindex:1,fieldset:1},
+ B = {input:1,button:1,select:1,textarea:1,label:1},
+ C = X({a:1},B),
+ D = X({iframe:1},C),
+ E = {hr:1,ul:1,menu:1,div:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1},
+ F = {ins:1,del:1,script:1},
+ G = X({b:1,acronym:1,bdo:1,'var':1,'#':1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1},F),
+ H = X({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1},G),
+ I = X({p:1},H),
+ J = X({iframe:1},H,B),
+ K = {img:1,noscript:1,br:1,kbd:1,center:1,button:1,basefont:1,h5:1,h4:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,'#':1,select:1,menu:1,ins:1,abbr:1,label:1,code:1,table:1,script:1,cite:1,input:1,iframe:1,strong:1,textarea:1,noframes:1,big:1,small:1,span:1,hr:1,sub:1,bdo:1,'var':1,div:1,object:1,sup:1,strike:1,dir:1,map:1,dl:1,applet:1,del:1,isindex:1,fieldset:1,ul:1,b:1,acronym:1,a:1,blockquote:1,i:1,u:1,s:1,tt:1,address:1,q:1,pre:1,p:1,em:1,dfn:1},
+
+ L = X({a:1},J),
+ M = {tr:1},
+ N = {'#':1},
+ O = X({param:1},K),
+ P = X({form:1},A,D,E,I),
+ Q = {li:1};
+
+ return /** @lends CKEDITOR.dtd */ {
+
+ // The "$" items have been added manually.
+
+ /**
+ * List of block elements, like "p" or "div".
+ * @type Object
+ * @example
+ */
+ $block : {address:1,blockquote:1,center:1,dir:1,div:1,dl:1,fieldset:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,isindex:1,menu:1,noframes:1,ol:1,p:1,pre:1,table:1,ul:1},
+
+ /**
+ * List of empty (self-closing) elements, like "br" or "img".
+ * @type Object
+ * @example
+ */
+ $empty : {area:1,base:1,br:1,col:1,hr:1,img:1,input:1,link:1,meta:1,param:1},
+
+ /**
+ * List of list item elements, like "li" or "dd".
+ * @type Object
+ * @example
+ */
+ $listItem : {dd:1,dt:1,li:1},
+
+ /**
+ * List of elements that can be ignored if empty, like "b" or "span".
+ * @type Object
+ * @example
+ */
+ $removeEmpty : {abbr:1,acronym:1,address:1,b:1,bdo:1,big:1,cite:1,code:1,dfn:1,em:1,font:1,i:1,kbd:1,q:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1},
+
+ /**
+ * List of elements used inside the "table" element, like "tbody" or "td".
+ * @type Object
+ * @example
+ */
+ $tableContent : {caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},
+
+ col : {},
+ tr : {td:1,th:1},
+ img : {},
+ colgroup : {col:1},
+ noscript : P,
+ td : P,
+ br : {},
+ th : P,
+ center : P,
+ kbd : L,
+ button : X(I,E),
+ basefont : {},
+ h5 : L,
+ h4 : L,
+ samp : L,
+ h6 : L,
+ ol : Q,
+ h1 : L,
+ h3 : L,
+ option : N,
+ h2 : L,
+ form : X(A,D,E,I),
+ select : {optgroup:1,option:1},
+ font : J, // Changed from L to J (see (1))
+ ins : P,
+ menu : Q,
+ abbr : L,
+ label : L,
+ table : {thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1},
+ code : L,
+ script : N,
+ tfoot : M,
+ cite : L,
+ li : P,
+ input : {},
+ iframe : P,
+ strong : J, // Changed from L to J (see (1))
+ textarea : N,
+ noframes : P,
+ big : J, // Changed from L to J (see (1))
+ small : J, // Changed from L to J (see (1))
+ span : J, // Changed from L to J (see (1))
+ hr : {},
+ dt : L,
+ sub : J, // Changed from L to J (see (1))
+ optgroup : {option:1},
+ param : {},
+ bdo : L,
+ 'var' : J, // Changed from L to J (see (1))
+ div : P,
+ object : O,
+ sup : J, // Changed from L to J (see (1))
+ dd : P,
+ strike : J, // Changed from L to J (see (1))
+ area : {},
+ dir : Q,
+ map : X({area:1,form:1,p:1},A,F,E),
+ applet : O,
+ dl : {dt:1,dd:1},
+ del : P,
+ isindex : {},
+ fieldset : X({legend:1},K),
+ thead : M,
+ ul : Q,
+ acronym : L,
+ b : J, // Changed from L to J (see (1))
+ a : J,
+ blockquote : P,
+ caption : L,
+ i : J, // Changed from L to J (see (1))
+ u : J, // Changed from L to J (see (1))
+ tbody : M,
+ s : L,
+ address : X(D,I),
+ tt : J, // Changed from L to J (see (1))
+ legend : L,
+ q : L,
+ pre : X(G,C),
+ p : L,
+ em : J, // Changed from L to J (see (1))
+ dfn : L
+ };
+})();
+
+/*
+ Notes:
+ (1) According to the DTD, many elements, like accept elements
+ inside of them. But, to produce better output results, we have manually
+ changed the map to avoid breaking the links on pieces, having
+ "this is a link test", instead of
+ "this is a link test".
+*/
Index: /CKEditor/branches/prototype/_source/core/loader.js
===================================================================
--- /CKEditor/branches/prototype/_source/core/loader.js (revision 2342)
+++ /CKEditor/branches/prototype/_source/core/loader.js (revision 2343)
@@ -42,5 +42,5 @@
'core/_bootstrap' : [ 'core/config', 'core/ckeditor', 'core/plugins', 'core/scriptLoader', 'core/tools', /* The following are entries that we wnat to force loading to at the end to avoid dependence recursion */ 'core/dom/text' ],
'core/ajax' : [ 'core/xml' ],
- 'core/ckeditor' : [ 'core/ajax', 'core/ckeditor_basic', 'core/dom', 'core/dom/document', 'core/dom/element', 'core/editor', 'core/event', 'core/htmlparser', 'core/htmlparser/element', 'core/htmlparser/fragment', 'core/tools', 'dtd/xhtml1-transitional' ],
+ 'core/ckeditor' : [ 'core/ajax', 'core/ckeditor_basic', 'core/dom', 'core/dtd', 'core/dom/document', 'core/dom/element', 'core/editor', 'core/event', 'core/htmlparser', 'core/htmlparser/element', 'core/htmlparser/fragment', 'core/tools' ],
'core/ckeditor_base' : [],
'core/ckeditor_basic' : [ 'core/env', 'core/event' ],
@@ -54,4 +54,5 @@
'core/dom/text' : [ 'core/dom/node', 'core/dom/domobject' ],
'core/dom/window' : [ 'core/dom/domobject' ],
+ 'core/dtd' : [ 'core/tools' ],
'core/editor' : [ 'core/config', 'core/event', 'core/plugins', 'core/skins', 'core/themes', 'core/tools', 'core/ui' ],
'core/env' : [],
@@ -69,7 +70,5 @@
'core/tools' : [ 'core/env' ],
'core/ui' : [],
- 'core/xml' : [ 'core/env' ],
-
- 'dtd/xhtml1-transitional' : []
+ 'core/xml' : [ 'core/env' ]
};