- From: Lachlan Hunt via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 11 Mar 2009 15:22:46 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/html-author/utils
In directory hutz:/tmp/cvs-serv8594
Modified Files:
categories-template.html categories.py elements.html
Log Message:
Work in progress updates to the categories script
Index: categories-template.html
===================================================================
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:22:54 UTC