- From: poot <cvsmail@w3.org>
- Date: Thu, 12 Mar 2009 00:23:17 +0900 (JST)
- To: public-html-diffs@w3.org
Work in progress updates to the categories script http://people.w3.org/mike/diffs/html5/html-author/utils/categories-template.1.3.html http://dev.w3.org/html5/html-author/utils/categories-template.html http://people.w3.org/mike/diffs/html5/html-author/utils/categories-template.diff.html http://dev.w3.org/cvsweb/html5/html-author/utils/categories-template.html?r1=1.2&r2=1.3&f=h =================================================================== RCS file: /sources/public/html5/html-author/utils/categories-template.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- categories-template.html 11 Mar 2009 14:09:31 -0000 1.2 +++ categories-template.html 11 Mar 2009 15:22:43 -0000 1.3 @@ -5,8 +5,8 @@ <thead> <tr> <th rowspan="2">Element</th> - <th>Standards Categories</th> - <th>Form Categories</th> + <th colspan="8">Standards Categories</th> + <th colspan="4">Form Associations</th> <tr> <th>Metadata Content</th> <th>Flow content</th> @@ -18,11 +18,16 @@ <th>Interactive content</th> <th>Listed</th> + <th>Labelable</th> + <th>Submittable</th> + <th>Resetable</th> </tr> </thead> <tbody> <tr> <td><code></code></td> + + <td></td> <td></td> <td></td> <td></td> @@ -30,6 +35,9 @@ <td></td> <td></td> <td></td> + + <td></td> + <td></td> <td></td> <td></td> </tr> Index: elements.html =================================================================== RCS file: /sources/public/html5/html-author/utils/elements.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- elements.html 11 Mar 2009 14:09:31 -0000 1.2 +++ elements.html 11 Mar 2009 15:22:44 -0000 1.3 @@ -1,5 +1,3 @@ -<!DOCTYPE html> -<title>The Elements</title> <!-- The html Element --> <div class="element"> <h2>The <dfn><code>html</code></dfn> element</h2> Index: categories.py =================================================================== RCS file: /sources/public/html5/html-author/utils/categories.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- categories.py 9 Mar 2009 16:11:12 -0000 1.1 +++ categories.py 11 Mar 2009 15:22:44 -0000 1.2 @@ -16,24 +16,30 @@ elements = config.sections() elements.sort() -parser = html5lib.HTMLParser(tree=treebuilders.getTreeBuilder("dom")) sourceFile = open("elements.html") -templateFile = open("category-template.html") -sourceDocument = parser.parse(sourceFile) +templateFile = open("categories-template.html") +source = parser.parseFragment(sourceFile) template = parser.parseFragment(templateFile) table = template[0] -tbody = table[1] +tbody = table.find("tbody") rowTemplate = tbody[0] tbody.remove(rowTemplate) -for element in elements: - tr = copy.deepcopy(rowTemplate) - tr[0][0].text = element - +categories = {} - tbody.append(tr) +for node in source: + if (node.tag != etree.Comment): + h2 = node.find("code") + print h2 -etree.ElementTree(table).write(sys.stdout) +#for element in elements: +# tr = copy.deepcopy(rowTemplate) +# tr[0][0].text = element + + +# tbody.append(tr) + +#etree.ElementTree(table).write(sys.stdout) sys.stdout.write("\n")
Received on Wednesday, 11 March 2009 15:23:52 UTC