Skip to content

Commit f3596aa

Browse files
committed
Fixed a number of bugs in specbugs.py and the spec build process.
1 parent caec6c1 commit f3596aa

File tree

4 files changed

+26
-20
lines changed

4 files changed

+26
-20
lines changed

Makefile.in

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ $(SPECS): ${SPEC_SPLIT_STAMP} ${BUILD_DIR} ${ISSUE_ANNOTATIONS} ${DIST_DIR}
3030
@echo "Joining microsections into $(@F) specification..."
3131
@./bin/microjoin.py -d ${BUILD_DIR} -o tempspec-$(@F) ${CONFIG_DIR}/$(subst .html,.conf,$(@F))
3232
@echo "Generating final document via Anolis (this may take 2-3 minutes)..."
33-
@@ANOLIS@ @ANOLIS_FLAGS@ ${BUILD_DIR}/tempspec-$(@F) $@
34-
@sed -i "s/@SPEC_NAME@/$(@F)/g" $@
35-
-@tidy -m -i -w 78 -ashtml $@
33+
@@ANOLIS@ @ANOLIS_FLAGS@ ${BUILD_DIR}/tempspec-$(@F) ${BUILD_DIR}/anolis-$(@F)
34+
@sed -i "s/@SPEC_NAME@/$(@F)/g" ${BUILD_DIR}/anolis-$(@F)
35+
-@tidy -m -i -w 78 -ashtml ${BUILD_DIR}/anolis-$(@F)
36+
@echo "Inserting bug identifiers into sections..."
37+
@./bin/specbugs.py -s ${BUILD_DIR}/anolis-$(@F) -n "HTML+RDFa (editor: Manu Sporny)" -o $@
3638
@echo "$(@F) spec written to: $@"
3739

3840
${SPEC_SPLIT_STAMP}: html5-hixie/source

bin/specbugs.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/env python
22
#
3-
# Retrieves a bug list, parses the bug list for the
3+
# Retrieves a bug list, retrieves all of the bugs in the bug list,
4+
# parses an input specification and marks the specification with bug
5+
# identifiers associated with the W3C bug tracker.
46
import sys, os, os.path
57
from optparse import OptionParser
68
import urllib
@@ -84,7 +86,7 @@ def addSpecBugWarnings(argv, stdout, environ):
8486
# Download the buglist if it doesn't already exist
8587
blFetcher = W3CUrlOpener()
8688
if(not os.path.exists(buglistFile)):
87-
log("INFO: Downloading %s buglist to %s..." % (buglistFile,))
89+
log("INFO: Downloading %s buglist to %s..." % (shortname, buglistFile))
8890
blFetcher.retrieve(quotedBugUrl, buglistFile)
8991

9092
# Download all of the bugs in the buglist
@@ -102,7 +104,6 @@ def addSpecBugWarnings(argv, stdout, environ):
102104

103105
# Process each of the bug reports
104106
for (key, value) in bugs.items():
105-
log("INFO: Processing bug %s" % (key,))
106107
bug = None
107108
try:
108109
bug = parse(value["filename"])
@@ -144,7 +145,8 @@ def addSpecBugWarnings(argv, stdout, environ):
144145
log("WARNING: Bug %s does not have an associated spec section" % \
145146
(bugId,))
146147

147-
# Process the input HTML file
148+
# Process the input HTML file and mark each section identified by a
149+
# bug with the relevant information
148150
specfile = open(options.specFile, "r")
149151
outfile = open(options.outFile, "w")
150152
activeElement = None
@@ -164,14 +166,14 @@ def addSpecBugWarnings(argv, stdout, environ):
164166
if(activeElement != None and
165167
line.find("</%s>" % activeElement) != -1):
166168
outfile.write(
167-
"\n<ul class=\"XXX annotation\"><li><b>Status</b>: " +
169+
"\n <p class=\"annotation\"><b>Status</b>: " +
168170
"There are W3C bug tracker items associated with this " +
169-
" section.</b></li>\n")
171+
" section.<br/><br/>\n")
170172
for bug in bugsBySection[idvalue]:
171-
outfile.write("<li class=\"XXX annotation\">" +
172-
"BUG #<a href=\"%s\">%s</a>: %s</li>" % \
173+
outfile.write(" <span class=\"annotation\">" +
174+
"BUG #<a href=\"%s\">%s</a>: %s</span><br/>\n" % \
173175
(bug["url"], bug["id"], bug["description"]))
174-
outfile.write("</ul>")
176+
outfile.write(" </p>\n")
175177
activeElement = None
176178

177179
specfile.close()

configure.ac

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ AC_CHECK_PROGS(WGET, wget /usr/bin/wget /usr/local/bin/wget, [not found], $PATH)
1414
ISSUE_ANNOTATIONS=build/issue-annotations.xml
1515

1616
# Setup the flags needed for Anolis
17-
ANOLIS_FLAGS="--w3c-compat-xref-a-placement --parser=lxml.html --output-encoding=us-ascii --allow-duplicate-dfns --annotations=$ISSUE_ANNOTATIONS --annotate-w3c-issues"
17+
#ANOLIS_FLAGS="--w3c-compat-xref-a-placement --parser=lxml.html --output-encoding=us-ascii --allow-duplicate-dfns --annotations=$ISSUE_ANNOTATIONS --annotate-w3c-issues"
18+
ANOLIS_FLAGS="--w3c-compat-xref-a-placement --parser=lxml.html --output-encoding=us-ascii --allow-duplicate-dfns"
1819
AC_SUBST(ANOLIS_FLAGS)
1920

2021
# Generate the printable date string

headers/header-w3c-rdfa-wd.in

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -309,14 +309,14 @@
309309
</p><!-- not everyone agrees with html5 (requested before fpwd) -->
310310
<p>Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.</p>
311311
<p>
312-
The publication of this document by the W3C as a W3C Working Draft does
313-
not imply endorsement by the majority of members of the W3C HTML working
314-
group or the W3C as a whole. In particular,
312+
The publication of this document by the W3C as a W3C Working Draft does
313+
not imply endorsement by the W3C HTML Working Group or the W3C as a whole.
314+
In particular,
315315
</p>
316316
<ul>
317317
<li>There are one or more alternate methods of adding data without
318318
using RDFa, such as
319-
[<a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html">microdata</a>].</li>
319+
[<a href="http://www.w3.org/TR/microdata/">microdata</a>].</li>
320320
<li>There are discussions of alternate extensibility mechanisms,
321321
covered in
322322
[<a href="http://www.w3.org/html/wg/tracker/issues/41">issue-41</a>],
@@ -334,10 +334,11 @@
334334
</p>
335335
<!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING LIST TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- status of document, group responsible (required) -->
336336
<p>
337-
This specification has been developed by the
337+
This specification has been jointly developed by the
338338
<a href="http://www.w3.org/2001/sw/BestPractices/HTML/">RDFa Task Force</a>
339-
and is currently being published by the
340-
<a href="http://www.w3.org/html/wg/">W3C HTML Working Group</a>
339+
and the <a href="http://www.w3.org/html/wg/">HTML Working Group</a> and
340+
is currently being published by the
341+
<a href="http://www.w3.org/html/wg/">HTML Working Group</a>
341342
to further discussions there.
342343
</p>
343344
<!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- context and rationale (required) -->

0 commit comments

Comments
 (0)