- From: Lachlan Hunt via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 23 Mar 2009 17:14:13 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/html-author/utils
In directory hutz:/tmp/cvs-serv16449/utils
Modified Files:
categories.py elementdesc.txt indexelements.html
Log Message:
Added tt element to obsolete elements table
Index: elementdesc.txt
===================================================================
RCS file: /sources/public/html5/html-author/utils/elementdesc.txt,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- elementdesc.txt 11 Mar 2009 14:09:31 -0000 1.9
+++ elementdesc.txt 23 Mar 2009 17:14:11 -0000 1.10
@@ -986,7 +986,7 @@
start=required
end=required
status=obsolete
-notes=Consider using the <code>del</code>, if appropriate, or another semantically appropriate element with CSS for style.
+notes=Consider using the <code>del</code> element, if appropriate, or another semantically appropriate element with CSS for style.
html4=transitional
[spacer]
@@ -1004,7 +1004,16 @@
start=required
end=required
status=obsolete
-notes=Consider using the <code>del</code>, if appropriate, or another semantically appropriate element with CSS for style.
+notes=Consider using the <code>del</code> element, if appropriate, or another semantically appropriate element with CSS for style.
+html4=transitional
+
+[tt]
+desc=The <code>tt</code> element
+meaning=Teletype
+start=required
+end=required
+status=obsolete
+notes=Consider using the <code>code</code> element, if appropriate, or another semantically appropriate element with CSS for style.
html4=transitional
[u]
Index: categories.py
===================================================================
RCS file: /sources/public/html5/html-author/utils/categories.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- categories.py 13 Mar 2009 15:45:01 -0000 1.3
+++ categories.py 23 Mar 2009 17:14:11 -0000 1.4
@@ -10,26 +10,27 @@
parser = html5lib.HTMLParser(tree=treebuilders.getTreeBuilder("lxml"))
-config = ConfigParser.RawConfigParser()
-config.read("elementdesc.txt")
-
-elements = config.sections()
-elements.sort()
+def readElementData(sourceFile):
+ config = ConfigParser.RawConfigParser()
+ config.read(sourceFile)
+ return config
-sourceFile = open("elements.html")
-templateFile = open("categories-template.html")
-source = parser.parseFragment(sourceFile)
-template = parser.parseFragment(templateFile)
+def readSource(soureFile):
+ sourceFile = open(sourceFile)
+ source = parser.parseFragment(sourceFile)
+ return source
def getCategoryLists(source):
- categories = {}
+ categories = []
+ category = {}
for node in source:
if (node.tag != etree.Comment):
tagnames = node.xpath("h2/dfn/code")
catlist = node.xpath(".//table//tr[1]//li")
for tag in tagnames:
- categories[tag.text] = catlist
+
+ categories.append(category)
return categories
def getCategory(li):
@@ -40,17 +41,17 @@
else:
return [li.xpath("span[last()]")[0].text, li.text]
-table = template[0]
-tbody = table.find("tbody")
-
-rowTemplate = tbody[0]
-tbody.remove(rowTemplate)
-
for element in elements:
- tr = copy.deepcopy(rowTemplate)
- tr[0][0].text = element
+
+def main():
+ elementData = readElementData("elementdesc.txt")
+ elements = elementData.sections()
+ elements.sort()
- tbody.append(tr)
+ source = readSource("elements.html")
-#etree.ElementTree(table).write(sys.stdout)
-sys.stdout.write("\n")
+ categories = getCategoryLists(source)
+ sys.stdout.write()
+
+if __name__ == "__main__":
+ main()
Index: indexelements.html
===================================================================
RCS file: /sources/public/html5/html-author/utils/indexelements.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- indexelements.html 6 Mar 2009 11:46:04 -0000 1.3
+++ indexelements.html 23 Mar 2009 17:14:11 -0000 1.4
@@ -151,7 +151,7 @@
</tr>
<tr>
<td><code>colgroup</code></td>
- <td>required</td>
+ <td>optional</td>
<td>optional</td>
<td>Table column group</td>
<td/>
@@ -869,7 +869,7 @@
<td>required</td>
<td>required</td>
<td></td>
- <td>Consider using the <code>del</code>, if appropriate, or another semantically appropriate element with CSS for style.</td>
+ <td>Consider using the <code>del</code> element, if appropriate, or another semantically appropriate element with CSS for style.</td>
</tr>
<tr>
<td><code>spacer</code></td>
@@ -883,7 +883,14 @@
<td>required</td>
<td>required</td>
<td></td>
- <td>Consider using the <code>del</code>, if appropriate, or another semantically appropriate element with CSS for style.</td>
+ <td>Consider using the <code>del</code> element, if appropriate, or another semantically appropriate element with CSS for style.</td>
+ </tr>
+ <tr>
+ <td><code>tt</code></td>
+ <td>required</td>
+ <td>required</td>
+ <td>Teletype</td>
+ <td>Consider using the <code>code</code> element, if appropriate, or another semantically appropriate element with CSS for style.</td>
</tr>
<tr>
<td><code>u</code></td>
Received on Monday, 23 March 2009 17:14:24 UTC