-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
889591c
commit be3bc51
Showing
3 changed files
with
146 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/usr/bin/env python2 | ||
import io | ||
import os | ||
from lxml import html | ||
from shutil import copyfile | ||
|
||
|
||
def main(): | ||
DIR = os.environ["DIR"] | ||
if "review-drafts" not in DIR: | ||
return | ||
specFilename = os.path.join(DIR, "index.html") | ||
w3cFilename = "w3c-status.html" | ||
specFile = io.open(specFilename, 'r+', encoding='utf-8') | ||
w3cFile = io.open(w3cFilename, 'r+', encoding='utf-8') | ||
doc = html.parse(io.StringIO(unicode(specFile.read()))) | ||
w3c = html.fragments_fromstring(unicode(w3cFile.read())) | ||
logo = w3c[0] | ||
title = w3c[1] | ||
subtitle = w3c[2] | ||
summaryText = w3c[3].text | ||
firstParagraph = w3c[4] | ||
ipr = w3c[5] | ||
status = w3c[6] | ||
head = doc.xpath("/html/head")[0] | ||
head.replace(doc.xpath("/html/head/title")[0], title) | ||
hgroup = doc.xpath("//hgroup")[0] | ||
hgroup.replace(doc.xpath("//h2[@id='subtitle']")[0], subtitle) | ||
annoyingWarning = doc.xpath("(//body/div[@class='head']/" + | ||
"details[@class='annoying-warning'])")[0] | ||
annoyingWarning.attrib['style'] = 'background-color: yellow;' + \ | ||
' color: black !important; text-shadow: none' | ||
summary = doc.xpath("(//body/div[@class='head']/" + | ||
"details[@class='annoying-warning']/summary)")[0] | ||
summary.text = summaryText | ||
links = doc.xpath("(//body/div[@class='head']/" + | ||
"details[@class='annoying-warning']//a)") | ||
for link in links: | ||
link.attrib['style'] = 'color: black !important' | ||
logoParagraph = doc.xpath("//body/div[@class='head']/p")[0] | ||
logoParagraph.append(logo) | ||
firstParagraph = doc.xpath("(//body/div[@class='head']/" + | ||
"details[@class='annoying-warning']/p)[1]") | ||
annoyingWarning.replace(firstParagraph[0], w3c[4]) | ||
iprParagraph = doc.xpath("(//body/div[@class='head']/" + | ||
"details[@class='annoying-warning']/p)[2]")[0] | ||
iprParagraph.append(ipr) | ||
lastParagraph = doc.xpath("(//body/div[@class='head']/" + | ||
"details[@class='annoying-warning']/p)[3]")[0] | ||
lastParagraph.text = \ | ||
lastParagraph.text.replace("Do not attempt to implement this version" + | ||
" of the standard. ", "") | ||
paragraphs = doc.xpath("(//body/div[@class='head']/" + | ||
"details[@class='annoying-warning']//p)") | ||
for paragraph in paragraphs: | ||
paragraph.attrib['style'] = 'text-shadow: none' | ||
body = doc.xpath("//body")[0] | ||
body.append(status) | ||
specFile.seek(0) | ||
specFile.write(unicode(html.tostring(doc))) | ||
specFile.truncate() | ||
specFile.close() | ||
copyfile(specFilename, "index.html") | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<a class="logo" href="#w3c-rec" | ||
><img alt="W3C" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" | ||
width="100" | ||
style="position: absolute; top: 2em; right: 8em"></a> | ||
<title>DOM Standard Review Draft June 2019</title> | ||
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Review Draft — Published <time class="dt-updated" datetime="2019-06-18">18 June 2019</time></span></h2> | ||
<summary>This is a Review Draft of the Standard and a W3C Candidate | ||
Recommendation.</summary> | ||
<p style="text-shadow: none">This document is published for purposes of | ||
patent review by WHATWG Workstream Participants and as a W3C Candidate | ||
Recommendation; it is a snapshot of the | ||
<a href="https://dom.spec.whatwg.org/" | ||
style="color: black !important">Living Standard</a>, | ||
redacting only text that is identified as "Objection Pending" or | ||
"Confirmation Pending". Developers should refer to the | ||
<a href="https://dom.spec.whatwg.org/" | ||
style="color: black !important" >Living Standard</a> | ||
for the most-current error corrections and other | ||
developments.</p> | ||
<span>For information regarding status and patent commitments under the | ||
W3C IPR policy, see the | ||
<a href="#w3c-rec" style="color: black !important" | ||
>W3C Recommendation status</a>.</span> | ||
<div> | ||
<h2 class="no-num heading settled" id="w3c-rec"><span | ||
class="content">W3C Recommendation Status</span><a | ||
class="self-link" href="#w3c-rec"></a></h2> | ||
<p>This Living Standard is also endorsed as a W3C Candidate | ||
Recommendation under the terms of the | ||
<a href="https://www.w3.org/2019/04/WHATWG-W3C-MOU.html#transition" | ||
>Memorandum of Understanding</a>. For those purposes, it | ||
contains the following metadata:</p> | ||
<dl> | ||
<dt>Canonical version / latest Living Standard: | ||
<dd><a href="https://dom.spec.whatwg.org/" | ||
>https://dom.spec.whatwg.org/</a> | ||
<dt>This version: | ||
<dd><a href="https://dom.spec.whatwg.org/review-drafts/2019-06/" | ||
>https://dom.spec.whatwg.org/review-drafts/2019-06/</a> | ||
<dt>W3C Version Mnemonic: | ||
<dd>DOM 2019-06 | ||
<dt>Status of This Document | ||
<dd> | ||
<p> | ||
<em>This section describes the status of this document at the time of | ||
its publication. Other documents may supersede this document. A list | ||
of current W3C publications and the latest revision of this technical | ||
report can be found in the W3C technical reports index at <a | ||
href="https://www.w3.org/TR/">https://www.w3.org/TR/</a>.</em> | ||
<p> | ||
The following features are <a | ||
href='https://www.w3.org/Consortium/Process/#candidate-rec' | ||
>at-risk</a> for the purpose of the W3C Candidate Recommendation: | ||
<ul> | ||
<li><a href=#interface-abstractrange>AbstractRange</a> | ||
(lacks two implementations in current engines) | ||
<li><a href=#dom-document-origin>document.origin</a> | ||
(lacks two implementations in current engines) | ||
</ul> | ||
<p> | ||
The <a href="https://www.w3.org/2019/html/">W3C HTML Working Group</a> | ||
co-produced this document under the <a | ||
href="https://www.w3.org/Consortium/Patent-Policy/">W3C Patent | ||
Policy</a> and the <a | ||
href="https://www.w3.org/2019/Process-20190301/">01 March 2019 W3C | ||
Process Document</a>. W3C maintains a <a | ||
href="https://www.w3.org/2004/01/pp-impl/115520/status">public list of | ||
any patent disclosures</a> made in connection with the deliverables | ||
of the group; that page also includes instructions for disclosing a | ||
patent. An individual who has actual knowledge of a patent which the | ||
individual believes contains <a | ||
href="https://www.w3.org/Consortium/Patent-Policy/#def-essential" | ||
>Essential Claim(s)</a> must disclose the information in accordance | ||
with | ||
<a href="https://www.w3.org/Consortium/Patent-Policy/#sec-Disclosure" | ||
>section 6 of the W3C Patent Policy</a>. | ||
</dl> | ||
</div> |