summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/tools/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/tools/scripts')
-rw-r--r--testing/web-platform/tests/tools/scripts/id2path.js12
-rw-r--r--testing/web-platform/tests/tools/scripts/id2path.json822
-rw-r--r--testing/web-platform/tests/tools/scripts/manifest.js140
-rw-r--r--testing/web-platform/tests/tools/scripts/package.json11
-rw-r--r--testing/web-platform/tests/tools/scripts/toc.js107
-rw-r--r--testing/web-platform/tests/tools/scripts/update-directory-structure.js106
6 files changed, 1198 insertions, 0 deletions
diff --git a/testing/web-platform/tests/tools/scripts/id2path.js b/testing/web-platform/tests/tools/scripts/id2path.js
new file mode 100644
index 000000000..39b8d644b
--- /dev/null
+++ b/testing/web-platform/tests/tools/scripts/id2path.js
@@ -0,0 +1,12 @@
+
+var fs = require("fs")
+, pth = require("path")
+, id = process.argv[2]
+;
+
+if (!id) {
+ console.log("Missing ID");
+ process.exit(1);
+}
+
+console.log(JSON.parse(fs.readFileSync(pth.join(__dirname, "id2path.json"), "utf8"))[id]);
diff --git a/testing/web-platform/tests/tools/scripts/id2path.json b/testing/web-platform/tests/tools/scripts/id2path.json
new file mode 100644
index 000000000..491bd8694
--- /dev/null
+++ b/testing/web-platform/tests/tools/scripts/id2path.json
@@ -0,0 +1,822 @@
+{
+ "introduction": "microdata/introduction",
+ "background": "html/introduction/background",
+ "audience": "html/introduction/audience",
+ "scope": "html/introduction/scope",
+ "history-0": "html/introduction/history-0",
+ "design-notes": "html/introduction/design-notes",
+ "serializability-of-script-execution": "html/introduction/design-notes/serializability-of-script-execution",
+ "compliance-with-other-specifications": "html/introduction/design-notes/compliance-with-other-specifications",
+ "html-vs-xhtml": "html/introduction/html-vs-xhtml",
+ "structure-of-this-specification": "html/introduction/structure-of-this-specification",
+ "how-to-read-this-specification": "html/introduction/structure-of-this-specification/how-to-read-this-specification",
+ "typographic-conventions": "html/introduction/structure-of-this-specification/typographic-conventions",
+ "fingerprint": "html/introduction/fingerprint",
+ "a-quick-introduction-to-html": "html/introduction/a-quick-introduction-to-html",
+ "writing-secure-applications-with-html": "html/introduction/a-quick-introduction-to-html/writing-secure-applications-with-html",
+ "common-pitfalls-to-avoid-when-using-the-scripting-apis": "html/introduction/a-quick-introduction-to-html/common-pitfalls-to-avoid-when-using-the-scripting-apis",
+ "conformance-requirements-for-authors": "html/introduction/conformance-requirements-for-authors",
+ "presentational-markup": "html/introduction/conformance-requirements-for-authors/presentational-markup",
+ "syntax-errors": "html/introduction/conformance-requirements-for-authors/syntax-errors",
+ "restrictions-on-content-models-and-on-attribute-values": "html/introduction/conformance-requirements-for-authors/restrictions-on-content-models-and-on-attribute-values",
+ "suggested-reading": "html/introduction/suggested-reading",
+ "infrastructure": "html/infrastructure",
+ "terminology": "microdata/terminology",
+ "resources": "html/infrastructure/terminology/resources",
+ "xml": "html/infrastructure/terminology/xml",
+ "dom-trees": "html/infrastructure/terminology/dom-trees",
+ "scripting-0": "html/infrastructure/terminology/scripting-0",
+ "plugins": "html/infrastructure/terminology/plugins",
+ "character-encodings": "html/infrastructure/terminology/character-encodings",
+ "conformance-requirements": "microdata/conformance-requirements",
+ "conformance-classes": "html/infrastructure/conformance-requirements/conformance-classes",
+ "dependencies": "microdata/dependencies",
+ "extensibility": "html/infrastructure/conformance-requirements/extensibility",
+ "case-sensitivity-and-string-comparison": "html/infrastructure/case-sensitivity-and-string-comparison",
+ "utf-8": "html/infrastructure/utf-8",
+ "common-microsyntaxes": "html/infrastructure/common-microsyntaxes",
+ "common-parser-idioms": "html/infrastructure/common-microsyntaxes/common-parser-idioms",
+ "boolean-attributes": "html/infrastructure/common-microsyntaxes/boolean-attributes",
+ "keywords-and-enumerated-attributes": "html/infrastructure/common-microsyntaxes/keywords-and-enumerated-attributes",
+ "numbers": "html/infrastructure/common-microsyntaxes/numbers",
+ "signed-integers": "html/infrastructure/common-microsyntaxes/numbers",
+ "non-negative-integers": "html/infrastructure/common-microsyntaxes/numbers",
+ "floating-point-numbers": "html/infrastructure/common-microsyntaxes/numbers",
+ "percentages-and-dimensions": "html/infrastructure/common-microsyntaxes/numbers",
+ "lists-of-integers": "html/infrastructure/common-microsyntaxes/numbers",
+ "lists-of-dimensions": "html/infrastructure/common-microsyntaxes/numbers",
+ "dates-and-times": "html/infrastructure/common-microsyntaxes/dates-and-times",
+ "months": "html/infrastructure/common-microsyntaxes/dates-and-times",
+ "dates": "html/infrastructure/common-microsyntaxes/dates-and-times",
+ "yearless-dates": "html/infrastructure/common-microsyntaxes/dates-and-times",
+ "times": "html/infrastructure/common-microsyntaxes/dates-and-times",
+ "local-dates-and-times": "html/infrastructure/common-microsyntaxes/dates-and-times",
+ "time-zones": "html/infrastructure/common-microsyntaxes/dates-and-times",
+ "global-dates-and-times": "html/infrastructure/common-microsyntaxes/dates-and-times",
+ "weeks": "html/infrastructure/common-microsyntaxes/dates-and-times",
+ "durations": "html/infrastructure/common-microsyntaxes/dates-and-times",
+ "vaguer-moments-in-time": "html/infrastructure/common-microsyntaxes/dates-and-times",
+ "colors": "html/infrastructure/common-microsyntaxes/colors",
+ "space-separated-tokens": "html/infrastructure/common-microsyntaxes/space-separated-tokens",
+ "comma-separated-tokens": "html/infrastructure/common-microsyntaxes/comma-separated-tokens",
+ "syntax-references": "html/infrastructure/common-microsyntaxes/syntax-references",
+ "mq": "html/infrastructure/common-microsyntaxes/mq",
+ "urls": "html/infrastructure/urls",
+ "terminology-0": "html/infrastructure/urls/terminology-0",
+ "parsing-urls": "html/infrastructure/urls/parsing-urls",
+ "base-urls": "html/infrastructure/urls/base-urls",
+ "resolving-urls": "html/infrastructure/urls/resolving-urls",
+ "url-manipulation-and-creation": "html/infrastructure/urls/url-manipulation-and-creation",
+ "dynamic-changes-to-base-urls": "html/infrastructure/urls/dynamic-changes-to-base-urls",
+ "interfaces-for-url-manipulation": "html/infrastructure/urls/interfaces-for-url-manipulation",
+ "fetching-resources": "html/infrastructure/fetching-resources",
+ "terminology-1": "html/infrastructure/fetching-resources/terminology-1",
+ "processing-model": "html/infrastructure/fetching-resources/processing-model",
+ "encrypted-http-and-related-security-concerns": "html/infrastructure/fetching-resources/encrypted-http-and-related-security-concerns",
+ "content-type-sniffing": "html/infrastructure/fetching-resources/content-type-sniffing",
+ "extracting-character-encodings-from-meta-elements": "html/infrastructure/fetching-resources/extracting-character-encodings-from-meta-elements",
+ "cors-settings-attributes": "html/infrastructure/fetching-resources/cors-settings-attributes",
+ "cors-enabled-fetch": "html/infrastructure/fetching-resources/cors-enabled-fetch",
+ "common-dom-interfaces": "html/infrastructure/common-dom-interfaces",
+ "reflecting-content-attributes-in-idl-attributes": "html/infrastructure/common-dom-interfaces/reflecting-content-attributes-in-idl-attributes",
+ "collections": "html/infrastructure/common-dom-interfaces/collections",
+ "htmlallcollection": "html/infrastructure/common-dom-interfaces/collections",
+ "htmlformcontrolscollection": "html/infrastructure/common-dom-interfaces/collections",
+ "htmloptionscollection": "html/infrastructure/common-dom-interfaces/collections",
+ "domstringmap": "html/infrastructure/common-dom-interfaces/domstringmap",
+ "transferable-objects": "html/infrastructure/common-dom-interfaces/transferable-objects",
+ "safe-passing-of-structured-data": "html/infrastructure/common-dom-interfaces/safe-passing-of-structured-data",
+ "garbage-collection": "html/infrastructure/common-dom-interfaces/garbage-collection",
+ "namespaces": "html/infrastructure/namespaces",
+ "dom": "html/dom",
+ "documents": "html/dom/documents",
+ "the-document-object": "html/dom/documents/the-document-object",
+ "security-document": "html/dom/documents/security-document",
+ "resource-metadata-management": "html/dom/documents/resource-metadata-management",
+ "dom-tree-accessors": "html/dom/documents/dom-tree-accessors",
+ "loading-xml-documents": "html/dom/documents/loading-xml-documents",
+ "elements": "html/dom/elements",
+ "semantics-0": "html/dom/elements/semantics-0",
+ "elements-in-the-dom": "html/dom/elements/elements-in-the-dom",
+ "global-attributes": "html/dom/elements/global-attributes",
+ "the-id-attribute": "html/dom/elements/global-attributes",
+ "the-title-attribute": "html/dom/elements/global-attributes",
+ "the-lang-and-xml:lang-attributes": "html/dom/elements/global-attributes",
+ "the-translate-attribute": "html/dom/elements/global-attributes",
+ "the-xml:base-attribute-(xml-only)": "html/dom/elements/global-attributes",
+ "the-dir-attribute": "html/dom/elements/global-attributes",
+ "classes": "html/dom/elements/global-attributes",
+ "the-style-attribute": "html/dom/elements/global-attributes",
+ "embedding-custom-non-visible-data-with-the-data-*-attributes": "html/dom/elements/global-attributes",
+ "element-definitions": "html/dom/elements/element-definitions",
+ "attributes": "html/dom/elements/element-definitions",
+ "content-models": "html/dom/elements/content-models",
+ "kinds-of-content": "html/dom/elements/content-models",
+ "metadata-content": "html/dom/elements/content-models",
+ "flow-content": "html/dom/elements/content-models",
+ "sectioning-content": "html/dom/elements/content-models",
+ "heading-content": "html/dom/elements/content-models",
+ "phrasing-content": "html/dom/elements/content-models",
+ "embedded-content": "html/dom/elements/content-models",
+ "interactive-content": "html/dom/elements/content-models",
+ "palpable-content": "html/dom/elements/content-models",
+ "transparent-content-models": "html/dom/elements/content-models",
+ "paragraphs": "html/dom/elements/content-models",
+ "requirements-relating-to-bidirectional-algorithm-formatting-characters": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters",
+ "wai-aria": "html/dom/elements/wai-aria",
+ "aria-role-attribute": "html/dom/elements/wai-aria",
+ "state-and-property-attributes": "html/dom/elements/wai-aria",
+ "sec-strong-native-semantics": "html/dom/elements/wai-aria",
+ "sec-implicit-aria-semantics": "html/dom/elements/wai-aria",
+ "interactions-with-xpath-and-xslt": "html/dom/interactions-with-xpath-and-xslt",
+ "dynamic-markup-insertion": "html/dom/dynamic-markup-insertion",
+ "opening-the-input-stream": "html/dom/dynamic-markup-insertion/opening-the-input-stream",
+ "closing-the-input-stream": "html/dom/dynamic-markup-insertion/closing-the-input-stream",
+ "document.write()": "html/dom/dynamic-markup-insertion/document-write",
+ "document.writeln()": "html/dom/dynamic-markup-insertion/document-writeln",
+ "semantics": "html/semantics",
+ "the-root-element": "html/semantics/the-root-element",
+ "the-html-element": "html/semantics/the-root-element/the-html-element",
+ "document-metadata": "html/semantics/document-metadata",
+ "the-head-element": "html/semantics/document-metadata/the-head-element",
+ "the-title-element": "html/semantics/document-metadata/the-title-element",
+ "the-base-element": "html/semantics/document-metadata/the-base-element",
+ "the-link-element": "html/semantics/document-metadata/the-link-element",
+ "the-meta-element": "html/semantics/document-metadata/the-meta-element",
+ "standard-metadata-names": "html/semantics/document-metadata/the-meta-element",
+ "other-metadata-names": "html/semantics/document-metadata/the-meta-element",
+ "pragma-directives": "html/semantics/document-metadata/the-meta-element",
+ "other-pragma-directives": "html/semantics/document-metadata/the-meta-element",
+ "charset": "html/semantics/document-metadata/the-meta-element",
+ "the-style-element": "html/semantics/document-metadata/the-style-element",
+ "styling": "html/semantics/document-metadata/styling",
+ "scripting-1": "html/semantics/scripting-1",
+ "the-script-element": "html/semantics/scripting-1/the-script-element",
+ "scriptingLanguages": "html/semantics/scripting-1/the-script-element",
+ "restrictions-for-contents-of-script-elements": "html/semantics/scripting-1/the-script-element",
+ "inline-documentation-for-external-scripts": "html/semantics/scripting-1/the-script-element",
+ "scriptTagXSLT": "html/semantics/scripting-1/the-script-element",
+ "the-noscript-element": "html/semantics/scripting-1/the-noscript-element",
+ "sections": "html/semantics/sections",
+ "the-body-element": "html/semantics/sections/the-body-element",
+ "the-article-element": "html/semantics/sections/the-article-element",
+ "the-section-element": "html/semantics/sections/the-section-element",
+ "the-nav-element": "html/semantics/sections/the-nav-element",
+ "the-aside-element": "html/semantics/sections/the-aside-element",
+ "the-h1,-h2,-h3,-h4,-h5,-and-h6-elements": "html/semantics/sections/the-h1-h2-h3-h4-h5-and-h6-elements",
+ "the-hgroup-element": "html/semantics/sections/the-hgroup-element",
+ "the-header-element": "html/semantics/sections/the-header-element",
+ "the-footer-element": "html/semantics/sections/the-footer-element",
+ "the-address-element": "html/semantics/sections/the-address-element",
+ "headings-and-sections": "html/semantics/sections/headings-and-sections",
+ "outlines": "html/semantics/sections/headings-and-sections",
+ "usage-summary-0": "html/semantics/sections/usage-summary-0",
+ "grouping-content": "html/semantics/grouping-content",
+ "the-p-element": "html/semantics/grouping-content/the-p-element",
+ "the-hr-element": "html/semantics/grouping-content/the-hr-element",
+ "the-pre-element": "html/semantics/grouping-content/the-pre-element",
+ "the-blockquote-element": "html/semantics/grouping-content/the-blockquote-element",
+ "the-ol-element": "html/semantics/grouping-content/the-ol-element",
+ "the-ul-element": "html/semantics/grouping-content/the-ul-element",
+ "the-li-element": "html/semantics/grouping-content/the-li-element",
+ "the-dl-element": "html/semantics/grouping-content/the-dl-element",
+ "the-dt-element": "html/semantics/grouping-content/the-dt-element",
+ "the-dd-element": "html/semantics/grouping-content/the-dd-element",
+ "the-figure-element": "html/semantics/grouping-content/the-figure-element",
+ "the-figcaption-element": "html/semantics/grouping-content/the-figcaption-element",
+ "the-div-element": "html/semantics/grouping-content/the-div-element",
+ "text-level-semantics": "html/semantics/text-level-semantics",
+ "the-a-element": "html/semantics/text-level-semantics/the-a-element",
+ "the-em-element": "html/semantics/text-level-semantics/the-em-element",
+ "the-strong-element": "html/semantics/text-level-semantics/the-strong-element",
+ "the-small-element": "html/semantics/text-level-semantics/the-small-element",
+ "the-s-element": "html/semantics/text-level-semantics/the-s-element",
+ "the-cite-element": "html/semantics/text-level-semantics/the-cite-element",
+ "the-q-element": "html/semantics/text-level-semantics/the-q-element",
+ "the-dfn-element": "html/semantics/text-level-semantics/the-dfn-element",
+ "the-abbr-element": "html/semantics/text-level-semantics/the-abbr-element",
+ "the-time-element": "html/semantics/text-level-semantics/the-time-element",
+ "the-code-element": "html/semantics/text-level-semantics/the-code-element",
+ "the-var-element": "html/semantics/text-level-semantics/the-var-element",
+ "the-samp-element": "html/semantics/text-level-semantics/the-samp-element",
+ "the-kbd-element": "html/semantics/text-level-semantics/the-kbd-element",
+ "the-sub-and-sup-elements": "html/semantics/text-level-semantics/the-sub-and-sup-elements",
+ "the-i-element": "html/semantics/text-level-semantics/the-i-element",
+ "the-b-element": "html/semantics/text-level-semantics/the-b-element",
+ "the-u-element": "html/semantics/text-level-semantics/the-u-element",
+ "the-mark-element": "html/semantics/text-level-semantics/the-mark-element",
+ "the-ruby-element": "html/semantics/text-level-semantics/the-ruby-element",
+ "the-rt-element": "html/semantics/text-level-semantics/the-rt-element",
+ "the-rp-element": "html/semantics/text-level-semantics/the-rp-element",
+ "the-bdi-element": "html/semantics/text-level-semantics/the-bdi-element",
+ "the-bdo-element": "html/semantics/text-level-semantics/the-bdo-element",
+ "the-span-element": "html/semantics/text-level-semantics/the-span-element",
+ "the-br-element": "html/semantics/text-level-semantics/the-br-element",
+ "the-wbr-element": "html/semantics/text-level-semantics/the-wbr-element",
+ "usage-summary": "html/semantics/text-level-semantics/usage-summary",
+ "edits": "html/semantics/edits",
+ "the-ins-element": "html/semantics/edits/the-ins-element",
+ "the-del-element": "html/semantics/edits/the-del-element",
+ "attributes-common-to-ins-and-del-elements": "html/semantics/edits/attributes-common-to-ins-and-del-elements",
+ "edits-and-paragraphs": "html/semantics/edits/edits-and-paragraphs",
+ "edits-and-lists": "html/semantics/edits/edits-and-lists",
+ "edits-and-tables": "html/semantics/edits/edits-and-tables",
+ "embedded-content-0": "html/semantics/embedded-content-0",
+ "the-img-element": "html/semantics/embedded-content-0/the-img-element",
+ "alt": "html/semantics/embedded-content-0/the-img-element",
+ "general-guidelines": "html/semantics/embedded-content-0/the-img-element",
+ "a-link-or-button-containing-nothing-but-the-image": "html/semantics/embedded-content-0/the-img-element",
+ "a-phrase-or-paragraph-with-an-alternative-graphical-representation:-charts,-diagrams,-graphs,-maps,-illustrations": "html/semantics/embedded-content-0/the-img-element",
+ "a-short-phrase-or-label-with-an-alternative-graphical-representation:-icons,-logos": "html/semantics/embedded-content-0/the-img-element",
+ "text-that-has-been-rendered-to-a-graphic-for-typographical-effect": "html/semantics/embedded-content-0/the-img-element",
+ "a-graphical-representation-of-some-of-the-surrounding-text": "html/semantics/embedded-content-0/the-img-element",
+ "a-purely-decorative-image-that-doesn't-add-any-information": "html/semantics/embedded-content-0/the-img-element",
+ "a-group-of-images-that-form-a-single-larger-picture-with-no-links": "html/semantics/embedded-content-0/the-img-element",
+ "a-group-of-images-that-form-a-single-larger-picture-with-links": "html/semantics/embedded-content-0/the-img-element",
+ "a-key-part-of-the-content": "html/semantics/embedded-content-0/the-img-element",
+ "an-image-not-intended-for-the-user": "html/semantics/embedded-content-0/the-img-element",
+ "guidance-for-markup-generators": "html/semantics/embedded-content-0/the-img-element",
+ "guidance-for-conformance-checkers": "html/semantics/embedded-content-0/the-img-element",
+ "the-iframe-element": "html/semantics/embedded-content-0/the-iframe-element",
+ "the-embed-element": "html/semantics/embedded-content-0/the-embed-element",
+ "the-object-element": "html/semantics/embedded-content-0/the-object-element",
+ "the-param-element": "html/semantics/embedded-content-0/the-param-element",
+ "the-video-element": "html/semantics/embedded-content-0/the-video-element",
+ "the-audio-element": "html/semantics/embedded-content-0/the-audio-element",
+ "the-source-element": "html/semantics/embedded-content-0/the-source-element",
+ "the-track-element": "html/semantics/embedded-content-0/the-track-element",
+ "media-elements": "html/semantics/embedded-content-0/media-elements",
+ "error-codes": "html/semantics/embedded-content-0/media-elements",
+ "location-of-the-media-resource": "html/semantics/embedded-content-0/media-elements",
+ "mime-types": "html/semantics/embedded-content-0/media-elements",
+ "network-states": "html/semantics/embedded-content-0/media-elements",
+ "loading-the-media-resource": "html/semantics/embedded-content-0/media-elements",
+ "offsets-into-the-media-resource": "html/semantics/embedded-content-0/media-elements",
+ "ready-states": "html/semantics/embedded-content-0/media-elements",
+ "playing-the-media-resource": "html/semantics/embedded-content-0/media-elements",
+ "seeking": "html/semantics/embedded-content-0/media-elements",
+ "media-resources-with-multiple-media-tracks": "html/semantics/embedded-content-0/media-elements",
+ "audiotracklist-and-videotracklist-objects": "html/semantics/embedded-content-0/media-elements",
+ "selecting-specific-audio-and-video-tracks-declaratively": "html/semantics/embedded-content-0/media-elements",
+ "synchronising-multiple-media-elements": "html/semantics/embedded-content-0/media-elements",
+ "introduction-0": "html/semantics/embedded-content-0/media-elements",
+ "media-controllers": "html/semantics/embedded-content-0/media-elements",
+ "assigning-a-media-controller-declaratively": "html/semantics/embedded-content-0/media-elements",
+ "timed-text-tracks": "html/semantics/embedded-content-0/media-elements",
+ "text-track-model": "html/semantics/embedded-content-0/media-elements",
+ "sourcing-in-band-text-tracks": "html/semantics/embedded-content-0/media-elements",
+ "sourcing-out-of-band-text-tracks": "html/semantics/embedded-content-0/media-elements",
+ "guidelines-for-exposing-cues-in-various-formats-as-text-track-cues": "html/semantics/embedded-content-0/media-elements",
+ "text-track-api": "html/semantics/embedded-content-0/media-elements",
+ "text-tracks-describing-chapters": "html/semantics/embedded-content-0/media-elements",
+ "cue-events": "html/semantics/embedded-content-0/media-elements",
+ "user-interface": "html/semantics/embedded-content-0/media-elements",
+ "time-ranges": "html/semantics/embedded-content-0/media-elements",
+ "event-definitions": "html/semantics/embedded-content-0/media-elements",
+ "mediaevents": "html/semantics/embedded-content-0/media-elements",
+ "security-and-privacy-considerations": "html/semantics/embedded-content-0/media-elements",
+ "best-practices-for-authors-using-media-elements": "html/semantics/embedded-content-0/media-elements",
+ "best-practices-for-implementors-of-media-elements": "html/semantics/embedded-content-0/media-elements",
+ "the-canvas-element": "html/semantics/embedded-content-0/the-canvas-element",
+ "color-spaces-and-color-correction": "html/semantics/embedded-content-0/the-canvas-element",
+ "security-with-canvas-elements": "html/semantics/embedded-content-0/the-canvas-element",
+ "the-map-element": "html/semantics/embedded-content-0/the-map-element",
+ "the-area-element": "html/semantics/embedded-content-0/the-area-element",
+ "image-maps": "html/semantics/embedded-content-0/image-maps",
+ "authoring": "html/semantics/embedded-content-0/image-maps",
+ "processing-model-0": "html/semantics/embedded-content-0/image-maps",
+ "mathml": "html/semantics/embedded-content-0/mathml",
+ "svg": "html/semantics/embedded-content-0/svg",
+ "dimension-attributes": "html/semantics/embedded-content-0/dimension-attributes",
+ "tabular-data": "html/semantics/tabular-data",
+ "the-table-element": "html/semantics/tabular-data/the-table-element",
+ "table-descriptions-techniques": "html/semantics/tabular-data/the-table-element",
+ "table-layout-techniques": "html/semantics/tabular-data/the-table-element",
+ "the-caption-element": "html/semantics/tabular-data/the-caption-element",
+ "the-colgroup-element": "html/semantics/tabular-data/the-colgroup-element",
+ "the-col-element": "html/semantics/tabular-data/the-col-element",
+ "the-tbody-element": "html/semantics/tabular-data/the-tbody-element",
+ "the-thead-element": "html/semantics/tabular-data/the-thead-element",
+ "the-tfoot-element": "html/semantics/tabular-data/the-tfoot-element",
+ "the-tr-element": "html/semantics/tabular-data/the-tr-element",
+ "the-td-element": "html/semantics/tabular-data/the-td-element",
+ "the-th-element": "html/semantics/tabular-data/the-th-element",
+ "attributes-common-to-td-and-th-elements": "html/semantics/tabular-data/attributes-common-to-td-and-th-elements",
+ "processing-model-1": "html/semantics/tabular-data/processing-model-1",
+ "forming-a-table": "html/semantics/tabular-data/processing-model-1",
+ "header-and-data-cell-semantics": "html/semantics/tabular-data/processing-model-1",
+ "examples": "canvas2d/examples",
+ "forms": "html/semantics/forms",
+ "introduction-1": "html/semantics/forms/introduction-1",
+ "writing-a-form's-user-interface": "html/semantics/forms/introduction-1",
+ "implementing-the-server-side-processing-for-a-form": "html/semantics/forms/introduction-1",
+ "configuring-a-form-to-communicate-with-a-server": "html/semantics/forms/introduction-1",
+ "client-side-form-validation": "html/semantics/forms/introduction-1",
+ "enabling-client-side-automatic-filling-of-form-controls": "html/semantics/forms/introduction-1",
+ "improving-the-user-experience-on-mobile-devices": "html/semantics/forms/introduction-1",
+ "the-difference-between-the-field-type,-the-autofill-field-name,-and-the-input-modality": "html/semantics/forms/introduction-1",
+ "input-author-notes": "html/semantics/forms/introduction-1",
+ "categories": "html/semantics/forms/categories",
+ "the-form-element": "html/semantics/forms/the-form-element",
+ "the-fieldset-element": "html/semantics/forms/the-fieldset-element",
+ "the-legend-element": "html/semantics/forms/the-legend-element",
+ "the-label-element": "html/semantics/forms/the-label-element",
+ "the-input-element": "html/semantics/forms/the-input-element",
+ "states-of-the-type-attribute": "html/semantics/forms/the-input-element",
+ "hidden-state-(type=hidden)": "html/semantics/forms/the-input-element",
+ "text-(type=text)-state-and-search-state-(type=search)": "html/semantics/forms/the-input-element",
+ "telephone-state-(type=tel)": "html/semantics/forms/the-input-element",
+ "url-state-(type=url)": "html/semantics/forms/the-input-element",
+ "e-mail-state-(type=email)": "html/semantics/forms/the-input-element",
+ "password-state-(type=password)": "html/semantics/forms/the-input-element",
+ "date-and-time-state-(type=datetime)": "html/semantics/forms/the-input-element",
+ "date-state-(type=date)": "html/semantics/forms/the-input-element",
+ "month-state-(type=month)": "html/semantics/forms/the-input-element",
+ "week-state-(type=week)": "html/semantics/forms/the-input-element",
+ "time-state-(type=time)": "html/semantics/forms/the-input-element",
+ "local-date-and-time-state-(type=datetime-local)": "html/semantics/forms/the-input-element",
+ "number-state-(type=number)": "html/semantics/forms/the-input-element",
+ "range-state-(type=range)": "html/semantics/forms/the-input-element",
+ "color-state-(type=color)": "html/semantics/forms/the-input-element",
+ "checkbox-state-(type=checkbox)": "html/semantics/forms/the-input-element",
+ "radio-button-state-(type=radio)": "html/semantics/forms/the-input-element",
+ "file-upload-state-(type=file)": "html/semantics/forms/the-input-element",
+ "submit-button-state-(type=submit)": "html/semantics/forms/the-input-element",
+ "image-button-state-(type=image)": "html/semantics/forms/the-input-element",
+ "reset-button-state-(type=reset)": "html/semantics/forms/the-input-element",
+ "button-state-(type=button)": "html/semantics/forms/the-input-element",
+ "input-impl-notes": "html/semantics/forms/the-input-element",
+ "common-input-element-attributes": "html/semantics/forms/the-input-element",
+ "the-maxlength-attribute": "html/semantics/forms/the-input-element",
+ "the-size-attribute": "html/semantics/forms/the-input-element",
+ "the-readonly-attribute": "html/semantics/forms/the-input-element",
+ "the-required-attribute": "html/semantics/forms/the-input-element",
+ "the-multiple-attribute": "html/semantics/forms/the-input-element",
+ "the-pattern-attribute": "html/semantics/forms/the-input-element",
+ "the-min-and-max-attributes": "html/semantics/forms/the-input-element",
+ "the-step-attribute": "html/semantics/forms/the-input-element",
+ "the-list-attribute": "html/semantics/forms/the-input-element",
+ "the-placeholder-attribute": "html/semantics/forms/the-input-element",
+ "common-input-element-apis": "html/semantics/forms/the-input-element",
+ "common-event-behaviors": "html/semantics/forms/the-input-element",
+ "the-button-element": "html/semantics/forms/the-button-element",
+ "the-select-element": "html/semantics/forms/the-select-element",
+ "the-datalist-element": "html/semantics/forms/the-datalist-element",
+ "the-optgroup-element": "html/semantics/forms/the-optgroup-element",
+ "the-option-element": "html/semantics/forms/the-option-element",
+ "the-textarea-element": "html/semantics/forms/the-textarea-element",
+ "the-keygen-element": "html/semantics/forms/the-keygen-element",
+ "the-output-element": "html/semantics/forms/the-output-element",
+ "the-progress-element": "html/semantics/forms/the-progress-element",
+ "the-meter-element": "html/semantics/forms/the-meter-element",
+ "form-control-infrastructure": "html/semantics/forms/form-control-infrastructure",
+ "a-form-control's-value": "html/semantics/forms/form-control-infrastructure",
+ "mutability": "html/semantics/forms/form-control-infrastructure",
+ "association-of-controls-and-forms": "html/semantics/forms/form-control-infrastructure",
+ "attributes-common-to-form-controls": "html/semantics/forms/attributes-common-to-form-controls",
+ "naming-form-controls:-the-name-attribute": "html/semantics/forms/attributes-common-to-form-controls",
+ "submitting-element-directionality:-the-dirname-attribute": "html/semantics/forms/attributes-common-to-form-controls",
+ "limiting-user-input-length:-the-maxlength-attribute": "html/semantics/forms/attributes-common-to-form-controls",
+ "enabling-and-disabling-form-controls:-the-disabled-attribute": "html/semantics/forms/attributes-common-to-form-controls",
+ "form-submission": "html/semantics/forms/attributes-common-to-form-controls",
+ "autofocusing-a-form-control:-the-autofocus-attribute": "html/semantics/forms/attributes-common-to-form-controls",
+ "input-modalities:-the-inputmode-attribute": "html/semantics/forms/attributes-common-to-form-controls",
+ "autofilling-form-controls:-the-autocomplete-attribute": "html/semantics/forms/attributes-common-to-form-controls",
+ "textFieldSelection": "html/semantics/forms/textfieldselection",
+ "constraints": "html/semantics/forms/constraints",
+ "definitions": "html/semantics/forms/constraints",
+ "constraint-validation": "html/semantics/forms/constraints",
+ "the-constraint-validation-api": "html/semantics/forms/constraints",
+ "security-forms": "html/semantics/forms/constraints",
+ "form-submission-0": "html/semantics/forms/form-submission-0",
+ "introduction-2": "html/semantics/forms/form-submission-0",
+ "implicit-submission": "html/semantics/forms/form-submission-0",
+ "form-submission-algorithm": "html/semantics/forms/form-submission-0",
+ "constructing-form-data-set": "html/semantics/forms/form-submission-0",
+ "url-encoded-form-data": "html/semantics/forms/form-submission-0",
+ "multipart-form-data": "html/semantics/forms/form-submission-0",
+ "plain-text-form-data": "html/semantics/forms/form-submission-0",
+ "resetting-a-form": "html/semantics/forms/resetting-a-form",
+ "interactive-elements": "html/semantics/interactive-elements",
+ "the-details-element": "html/semantics/interactive-elements/the-details-element",
+ "the-summary-element": "html/semantics/interactive-elements/the-summary-element",
+ "the-command-element": "html/semantics/interactive-elements/the-command-element",
+ "the-menu-element": "html/semantics/interactive-elements/the-menu-element",
+ "menus-intro": "html/semantics/interactive-elements/the-menu-element",
+ "building-menus-and-toolbars": "html/semantics/interactive-elements/the-menu-element",
+ "context-menus": "html/semantics/interactive-elements/the-menu-element",
+ "toolbars": "html/semantics/interactive-elements/the-menu-element",
+ "commands": "html/semantics/interactive-elements/commands",
+ "using-the-a-element-to-define-a-command": "html/semantics/interactive-elements/commands",
+ "using-the-button-element-to-define-a-command": "html/semantics/interactive-elements/commands",
+ "using-the-input-element-to-define-a-command": "html/semantics/interactive-elements/commands",
+ "using-the-option-element-to-define-a-command": "html/semantics/interactive-elements/commands",
+ "using-the-command-element-to-define-a-command": "html/semantics/interactive-elements/commands",
+ "using-the-command-attribute-on-command-elements-to-define-a-command-indirectly": "html/semantics/interactive-elements/commands",
+ "using-the-accesskey-attribute-on-a-label-element-to-define-a-command": "html/semantics/interactive-elements/commands",
+ "using-the-accesskey-attribute-on-a-legend-element-to-define-a-command": "html/semantics/interactive-elements/commands",
+ "using-the-accesskey-attribute-to-define-a-command-on-other-elements": "html/semantics/interactive-elements/commands",
+ "the-dialog-element": "html/semantics/interactive-elements/the-dialog-element",
+ "anchor-points": "html/semantics/interactive-elements/the-dialog-element",
+ "links": "html/semantics/links",
+ "introduction-3": "html/semantics/links/introduction-3",
+ "links-created-by-a-and-area-elements": "html/semantics/links/links-created-by-a-and-area-elements",
+ "following-hyperlinks": "html/semantics/links/following-hyperlinks",
+ "downloading-resources": "html/semantics/links/downloading-resources",
+ "hyperlink-auditing": "html/semantics/links/downloading-resources",
+ "linkTypes": "html/semantics/links/linktypes",
+ "rel-alternate": "html/semantics/links/linktypes",
+ "link-type-author": "html/semantics/links/linktypes",
+ "link-type-bookmark": "html/semantics/links/linktypes",
+ "link-type-help": "html/semantics/links/linktypes",
+ "rel-icon": "html/semantics/links/linktypes",
+ "link-type-license": "html/semantics/links/linktypes",
+ "link-type-nofollow": "html/semantics/links/linktypes",
+ "link-type-noreferrer": "html/semantics/links/linktypes",
+ "link-type-prefetch": "html/semantics/links/linktypes",
+ "link-type-search": "html/semantics/links/linktypes",
+ "link-type-stylesheet": "html/semantics/links/linktypes",
+ "link-type-tag": "html/semantics/links/linktypes",
+ "sequential-link-types": "html/semantics/links/linktypes",
+ "link-type-next": "html/semantics/links/linktypes",
+ "link-type-prev": "html/semantics/links/linktypes",
+ "other-link-types": "html/semantics/links/linktypes",
+ "common-idioms": "html/semantics/common-idioms",
+ "the-main-part-of-the-content": "html/semantics/common-idioms/the-main-part-of-the-content",
+ "rel-up": "html/semantics/common-idioms/rel-up",
+ "tag-clouds": "html/semantics/common-idioms/tag-clouds",
+ "conversations": "html/semantics/common-idioms/conversations",
+ "footnotes": "html/semantics/common-idioms/footnotes",
+ "disabled-elements": "html/semantics/disabled-elements",
+ "selectors": "html/semantics/selectors",
+ "case-sensitivity": "html/semantics/selectors/case-sensitivity",
+ "pseudo-classes": "html/semantics/selectors/pseudo-classes",
+ "browsers": "html/browsers",
+ "windows": "html/browsers/windows",
+ "nested-browsing-contexts": "html/browsers/windows/nested-browsing-contexts",
+ "navigating-nested-browsing-contexts-in-the-dom": "html/browsers/windows/nested-browsing-contexts",
+ "auxiliary-browsing-contexts": "html/browsers/windows/auxiliary-browsing-contexts",
+ "navigating-auxiliary-browsing-contexts-in-the-dom": "html/browsers/windows/auxiliary-browsing-contexts",
+ "secondary-browsing-contexts": "html/browsers/windows/secondary-browsing-contexts",
+ "security-nav": "html/browsers/windows/security-nav",
+ "groupings-of-browsing-contexts": "html/browsers/windows/groupings-of-browsing-contexts",
+ "browsing-context-names": "html/browsers/windows/browsing-context-names",
+ "the-window-object": "html/browsers/the-window-object",
+ "security-window": "html/browsers/the-window-object/security-window",
+ "apis-for-creating-and-navigating-browsing-contexts-by-name": "html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name",
+ "accessing-other-browsing-contexts": "html/browsers/the-window-object/accessing-other-browsing-contexts",
+ "named-access-on-the-window-object": "html/browsers/the-window-object/named-access-on-the-window-object",
+ "garbage-collection-and-browsing-contexts": "html/browsers/the-window-object/garbage-collection-and-browsing-contexts",
+ "closing-browsing-contexts": "html/browsers/the-window-object/closing-browsing-contexts",
+ "browser-interface-elements": "html/browsers/the-window-object/browser-interface-elements",
+ "the-windowproxy-object": "html/browsers/the-window-object/the-windowproxy-object",
+ "origin": "html/browsers/origin",
+ "relaxing-the-same-origin-restriction": "html/browsers/origin/relaxing-the-same-origin-restriction",
+ "sandboxing": "html/browsers/sandboxing",
+ "history": "html/browsers/history",
+ "the-session-history-of-browsing-contexts": "html/browsers/history/the-session-history-of-browsing-contexts",
+ "the-history-interface": "html/browsers/history/the-history-interface",
+ "the-location-interface": "html/browsers/history/the-location-interface",
+ "security-location": "html/browsers/history/the-location-interface",
+ "history-notes": "html/browsers/history/history-notes",
+ "browsing-the-web": "html/browsers/browsing-the-web",
+ "navigating-across-documents": "html/browsers/browsing-the-web/navigating-across-documents",
+ "read-html": "html/browsers/browsing-the-web/read-html",
+ "read-xml": "html/browsers/browsing-the-web/read-xml",
+ "read-text": "html/browsers/browsing-the-web/read-text",
+ "read-multipart-x-mixed-replace": "html/browsers/browsing-the-web/read-multipart-x-mixed-replace",
+ "read-media": "html/browsers/browsing-the-web/read-media",
+ "read-plugin": "html/browsers/browsing-the-web/read-plugin",
+ "read-ua-inline": "html/browsers/browsing-the-web/read-ua-inline",
+ "scroll-to-fragid": "html/browsers/browsing-the-web/scroll-to-fragid",
+ "history-traversal": "html/browsers/browsing-the-web/history-traversal",
+ "event-definitions-0": "html/browsers/browsing-the-web/history-traversal",
+ "unloading-documents": "html/browsers/browsing-the-web/unloading-documents",
+ "event-definition": "html/browsers/browsing-the-web/unloading-documents",
+ "aborting-a-document-load": "html/browsers/browsing-the-web/aborting-a-document-load",
+ "offline": "html/browsers/offline",
+ "introduction-4": "html/browsers/offline/introduction-4",
+ "supporting-offline-caching-for-legacy-applications": "html/browsers/offline/introduction-4",
+ "appcacheevents": "html/browsers/offline/introduction-4",
+ "appcache": "html/browsers/offline/appcache",
+ "manifests": "html/browsers/offline/manifests",
+ "some-sample-manifests": "html/browsers/offline/manifests",
+ "writing-cache-manifests": "html/browsers/offline/manifests",
+ "parsing-cache-manifests": "html/browsers/offline/manifests",
+ "downloading-or-updating-an-application-cache": "html/browsers/offline/downloading-or-updating-an-application-cache",
+ "the-application-cache-selection-algorithm": "html/browsers/offline/the-application-cache-selection-algorithm",
+ "changesToNetworkingModel": "html/browsers/offline/changestonetworkingmodel",
+ "expiring-application-caches": "html/browsers/offline/expiring-application-caches",
+ "disk-space": "html/browsers/offline/disk-space",
+ "application-cache-api": "html/browsers/offline/application-cache-api",
+ "browser-state": "html/browsers/offline/browser-state",
+ "webappapis": "html/webappapis",
+ "scripting": "html/webappapis/scripting",
+ "introduction-5": "html/webappapis/scripting/introduction-5",
+ "enabling-and-disabling-scripting": "html/webappapis/scripting/enabling-and-disabling-scripting",
+ "processing-model-2": "html/webappapis/scripting/processing-model-2",
+ "definitions-0": "html/webappapis/scripting/processing-model-2",
+ "calling-scripts": "html/webappapis/scripting/processing-model-2",
+ "creating-scripts": "html/webappapis/scripting/processing-model-2",
+ "killing-scripts": "html/webappapis/scripting/processing-model-2",
+ "runtime-script-errors": "html/webappapis/scripting/processing-model-2",
+ "runtime-script-errors-in-documents": "html/webappapis/scripting/processing-model-2",
+ "event-loops": "html/webappapis/scripting/event-loops",
+ "definitions-1": "html/webappapis/scripting/event-loops",
+ "processing-model-3": "html/webappapis/scripting/event-loops",
+ "generic-task-sources": "html/webappapis/scripting/event-loops",
+ "javascript-protocol": "html/webappapis/scripting/javascript-protocol",
+ "events": "html/webappapis/scripting/events",
+ "event-handler-attributes": "html/webappapis/scripting/events",
+ "event-handlers-on-elements,-document-objects,-and-window-objects": "html/webappapis/scripting/events",
+ "event-firing": "html/webappapis/scripting/events",
+ "events-and-the-window-object": "html/webappapis/scripting/events",
+ "atob": "html/webappapis/atob",
+ "timers": "html/webappapis/timers",
+ "user-prompts": "html/webappapis/user-prompts",
+ "simple-dialogs": "html/webappapis/user-prompts/simple-dialogs",
+ "printing": "html/webappapis/user-prompts/printing",
+ "dialogs-implemented-using-separate-documents": "html/webappapis/user-prompts/dialogs-implemented-using-separate-documents",
+ "system-state-and-capabilities": "html/webappapis/system-state-and-capabilities",
+ "the-navigator-object": "html/webappapis/system-state-and-capabilities/the-navigator-object",
+ "client-identification": "html/webappapis/system-state-and-capabilities/the-navigator-object",
+ "custom-handlers": "html/webappapis/system-state-and-capabilities/the-navigator-object",
+ "security-and-privacy": "html/webappapis/system-state-and-capabilities/the-navigator-object",
+ "sample-handler-impl": "html/webappapis/system-state-and-capabilities/the-navigator-object",
+ "manually-releasing-the-storage-mutex": "html/webappapis/system-state-and-capabilities/the-navigator-object",
+ "the-external-interface": "html/webappapis/system-state-and-capabilities/the-external-interface",
+ "editing": "html/editing",
+ "the-hidden-attribute": "html/editing/the-hidden-attribute",
+ "inert-subtrees": "html/editing/inert-subtrees",
+ "the-inert-attribute": "html/editing/inert-subtrees/the-inert-attribute",
+ "activation": "html/editing/activation",
+ "focus": "html/editing/focus",
+ "sequential-focus-navigation-and-the-tabindex-attribute": "html/editing/focus/sequential-focus-navigation-and-the-tabindex-attribute",
+ "focus-management": "html/editing/focus/focus-management",
+ "document-level-focus-apis": "html/editing/focus/document-level-focus-apis",
+ "element-level-focus-apis": "html/editing/focus/element-level-focus-apis",
+ "assigning-keyboard-shortcuts": "html/editing/assigning-keyboard-shortcuts",
+ "introduction-6": "html/editing/assigning-keyboard-shortcuts/introduction-6",
+ "the-accesskey-attribute": "html/editing/assigning-keyboard-shortcuts/the-accesskey-attribute",
+ "processing-model-4": "html/editing/assigning-keyboard-shortcuts/processing-model-4",
+ "editing-0": "html/editing/editing-0",
+ "contenteditable": "html/editing/editing-0/contenteditable",
+ "making-entire-documents-editable:-the-designmode-idl-attribute": "html/editing/editing-0/making-entire-documents-editable-the-designmode-idl-attribute",
+ "best-practices-for-in-page-editors": "html/editing/editing-0/best-practices-for-in-page-editors",
+ "editing-apis": "html/editing/editing-0/editing-apis",
+ "spelling-and-grammar-checking": "html/editing/editing-0/spelling-and-grammar-checking",
+ "dnd": "html/editing/dnd",
+ "introduction-7": "html/editing/dnd/introduction-7",
+ "the-drag-data-store": "html/editing/dnd/the-drag-data-store",
+ "the-datatransfer-interface": "html/editing/dnd/the-datatransfer-interface",
+ "the-datatransferitemlist-interface": "html/editing/dnd/the-datatransfer-interface",
+ "the-datatransferitem-interface": "html/editing/dnd/the-datatransfer-interface",
+ "the-dragevent-interface": "html/editing/dnd/the-dragevent-interface",
+ "drag-and-drop-processing-model": "html/editing/dnd/drag-and-drop-processing-model",
+ "dndevents": "html/editing/dnd/dndevents",
+ "the-draggable-attribute": "html/editing/dnd/the-draggable-attribute",
+ "the-dropzone-attribute": "html/editing/dnd/the-dropzone-attribute",
+ "security-risks-in-the-drag-and-drop-model": "html/editing/dnd/security-risks-in-the-drag-and-drop-model",
+ "syntax": "html/syntax",
+ "writing": "html/syntax/writing",
+ "the-doctype": "html/syntax/writing/the-doctype",
+ "elements-0": "html/syntax/writing/elements-0",
+ "start-tags": "html/syntax/writing/elements-0",
+ "end-tags": "html/syntax/writing/elements-0",
+ "attributes-0": "html/syntax/writing/elements-0",
+ "optional-tags": "html/syntax/writing/elements-0",
+ "element-restrictions": "html/syntax/writing/elements-0",
+ "cdata-rcdata-restrictions": "html/syntax/writing/elements-0",
+ "text": "html/syntax/writing/text",
+ "newlines": "html/syntax/writing/text",
+ "character-references": "html/syntax/writing/character-references",
+ "cdata-sections": "html/syntax/writing/cdata-sections",
+ "comments": "html/syntax/writing/comments",
+ "parsing": "html/syntax/parsing",
+ "overview-of-the-parsing-model": "html/syntax/parsing",
+ "the-input-byte-stream": "html/syntax/parsing",
+ "determining-the-character-encoding": "html/syntax/parsing",
+ "character-encodings-0": "html/syntax/parsing",
+ "changing-the-encoding-while-parsing": "html/syntax/parsing",
+ "preprocessing-the-input-stream": "html/syntax/parsing",
+ "parse-state": "html/syntax/parsing",
+ "the-insertion-mode": "html/syntax/parsing",
+ "the-stack-of-open-elements": "html/syntax/parsing",
+ "the-list-of-active-formatting-elements": "html/syntax/parsing",
+ "the-element-pointers": "html/syntax/parsing",
+ "other-parsing-state-flags": "html/syntax/parsing",
+ "tokenization": "html/syntax/parsing",
+ "data-state": "html/syntax/parsing",
+ "character-reference-in-data-state": "html/syntax/parsing",
+ "rcdata-state": "html/syntax/parsing",
+ "character-reference-in-rcdata-state": "html/syntax/parsing",
+ "rawtext-state": "html/syntax/parsing",
+ "script-data-state": "html/syntax/parsing",
+ "plaintext-state": "html/syntax/parsing",
+ "tag-open-state": "html/syntax/parsing",
+ "end-tag-open-state": "html/syntax/parsing",
+ "tag-name-state": "html/syntax/parsing",
+ "rcdata-less-than-sign-state": "html/syntax/parsing",
+ "rcdata-end-tag-open-state": "html/syntax/parsing",
+ "rcdata-end-tag-name-state": "html/syntax/parsing",
+ "rawtext-less-than-sign-state": "html/syntax/parsing",
+ "rawtext-end-tag-open-state": "html/syntax/parsing",
+ "rawtext-end-tag-name-state": "html/syntax/parsing",
+ "script-data-less-than-sign-state": "html/syntax/parsing",
+ "script-data-end-tag-open-state": "html/syntax/parsing",
+ "script-data-end-tag-name-state": "html/syntax/parsing",
+ "script-data-escape-start-state": "html/syntax/parsing",
+ "script-data-escape-start-dash-state": "html/syntax/parsing",
+ "script-data-escaped-state": "html/syntax/parsing",
+ "script-data-escaped-dash-state": "html/syntax/parsing",
+ "script-data-escaped-dash-dash-state": "html/syntax/parsing",
+ "script-data-escaped-less-than-sign-state": "html/syntax/parsing",
+ "script-data-escaped-end-tag-open-state": "html/syntax/parsing",
+ "script-data-escaped-end-tag-name-state": "html/syntax/parsing",
+ "script-data-double-escape-start-state": "html/syntax/parsing",
+ "script-data-double-escaped-state": "html/syntax/parsing",
+ "script-data-double-escaped-dash-state": "html/syntax/parsing",
+ "script-data-double-escaped-dash-dash-state": "html/syntax/parsing",
+ "script-data-double-escaped-less-than-sign-state": "html/syntax/parsing",
+ "script-data-double-escape-end-state": "html/syntax/parsing",
+ "before-attribute-name-state": "html/syntax/parsing",
+ "attribute-name-state": "html/syntax/parsing",
+ "after-attribute-name-state": "html/syntax/parsing",
+ "before-attribute-value-state": "html/syntax/parsing",
+ "attribute-value-(double-quoted)-state": "html/syntax/parsing",
+ "attribute-value-(single-quoted)-state": "html/syntax/parsing",
+ "attribute-value-(unquoted)-state": "html/syntax/parsing",
+ "character-reference-in-attribute-value-state": "html/syntax/parsing",
+ "after-attribute-value-(quoted)-state": "html/syntax/parsing",
+ "self-closing-start-tag-state": "html/syntax/parsing",
+ "bogus-comment-state": "html/syntax/parsing",
+ "markup-declaration-open-state": "html/syntax/parsing",
+ "comment-start-state": "html/syntax/parsing",
+ "comment-start-dash-state": "html/syntax/parsing",
+ "comment-state": "html/syntax/parsing",
+ "comment-end-dash-state": "html/syntax/parsing",
+ "comment-end-state": "html/syntax/parsing",
+ "comment-end-bang-state": "html/syntax/parsing",
+ "doctype-state": "html/syntax/parsing",
+ "before-doctype-name-state": "html/syntax/parsing",
+ "doctype-name-state": "html/syntax/parsing",
+ "after-doctype-name-state": "html/syntax/parsing",
+ "after-doctype-public-keyword-state": "html/syntax/parsing",
+ "before-doctype-public-identifier-state": "html/syntax/parsing",
+ "doctype-public-identifier-(double-quoted)-state": "html/syntax/parsing",
+ "doctype-public-identifier-(single-quoted)-state": "html/syntax/parsing",
+ "after-doctype-public-identifier-state": "html/syntax/parsing",
+ "between-doctype-public-and-system-identifiers-state": "html/syntax/parsing",
+ "after-doctype-system-keyword-state": "html/syntax/parsing",
+ "before-doctype-system-identifier-state": "html/syntax/parsing",
+ "doctype-system-identifier-(double-quoted)-state": "html/syntax/parsing",
+ "doctype-system-identifier-(single-quoted)-state": "html/syntax/parsing",
+ "after-doctype-system-identifier-state": "html/syntax/parsing",
+ "bogus-doctype-state": "html/syntax/parsing",
+ "cdata-section-state": "html/syntax/parsing",
+ "tokenizing-character-references": "html/syntax/parsing",
+ "tree-construction": "html/syntax/parsing",
+ "creating-and-inserting-elements": "html/syntax/parsing",
+ "closing-elements-that-have-implied-end-tags": "html/syntax/parsing",
+ "foster-parenting": "html/syntax/parsing",
+ "parsing-main-inhtml": "html/syntax/parsing",
+ "the-initial-insertion-mode": "html/syntax/parsing",
+ "the-before-html-insertion-mode": "html/syntax/parsing",
+ "the-before-head-insertion-mode": "html/syntax/parsing",
+ "parsing-main-inhead": "html/syntax/parsing",
+ "parsing-main-inheadnoscript": "html/syntax/parsing",
+ "the-after-head-insertion-mode": "html/syntax/parsing",
+ "parsing-main-inbody": "html/syntax/parsing",
+ "parsing-main-incdata": "html/syntax/parsing",
+ "parsing-main-intable": "html/syntax/parsing",
+ "parsing-main-intabletext": "html/syntax/parsing",
+ "parsing-main-incaption": "html/syntax/parsing",
+ "parsing-main-incolgroup": "html/syntax/parsing",
+ "parsing-main-intbody": "html/syntax/parsing",
+ "parsing-main-intr": "html/syntax/parsing",
+ "parsing-main-intd": "html/syntax/parsing",
+ "parsing-main-inselect": "html/syntax/parsing",
+ "parsing-main-inselectintable": "html/syntax/parsing",
+ "parsing-main-afterbody": "html/syntax/parsing",
+ "parsing-main-inframeset": "html/syntax/parsing",
+ "parsing-main-afterframeset": "html/syntax/parsing",
+ "the-after-after-body-insertion-mode": "html/syntax/parsing",
+ "the-after-after-frameset-insertion-mode": "html/syntax/parsing",
+ "parsing-main-inforeign": "html/syntax/parsing",
+ "the-end": "html/syntax/parsing",
+ "coercing-an-html-dom-into-an-infoset": "html/syntax/parsing",
+ "an-introduction-to-error-handling-and-strange-cases-in-the-parser": "html/syntax/parsing",
+ "misnested-tags:-b-i-/b-/i": "html/syntax/parsing",
+ "misnested-tags:-b-p-/b-/p": "html/syntax/parsing",
+ "unexpected-markup-in-tables": "html/syntax/parsing",
+ "scripts-that-modify-the-page-as-it-is-being-parsed": "html/syntax/parsing",
+ "the-execution-of-scripts-that-are-moving-across-multiple-documents": "html/syntax/parsing",
+ "unclosed-formatting-elements": "html/syntax/parsing",
+ "serializing-html-fragments": "html/syntax/serializing-html-fragments",
+ "parsing-html-fragments": "html/syntax/parsing-html-fragments",
+ "named-character-references": "html/syntax/named-character-references",
+ "the-xhtml-syntax": "html/the-xhtml-syntax",
+ "writing-xhtml-documents": "html/the-xhtml-syntax/writing-xhtml-documents",
+ "parsing-xhtml-documents": "html/the-xhtml-syntax/parsing-xhtml-documents",
+ "serializing-xhtml-fragments": "html/the-xhtml-syntax/serializing-xhtml-fragments",
+ "parsing-xhtml-fragments": "html/the-xhtml-syntax/parsing-xhtml-fragments",
+ "rendering": "html/rendering",
+ "introduction-8": "html/rendering/introduction-8",
+ "the-css-user-agent-style-sheet-and-presentational-hints": "html/rendering/the-css-user-agent-style-sheet-and-presentational-hints",
+ "non-replaced-elements": "html/rendering/non-replaced-elements",
+ "hidden-elements": "html/rendering/non-replaced-elements/hidden-elements",
+ "the-page": "html/rendering/non-replaced-elements/the-page",
+ "flow-content-0": "html/rendering/non-replaced-elements/flow-content-0",
+ "phrasing-content-0": "html/rendering/non-replaced-elements/phrasing-content-0",
+ "bidirectional-text": "html/rendering/non-replaced-elements/bidirectional-text",
+ "quotes": "html/rendering/non-replaced-elements/quotes",
+ "sections-and-headings": "html/rendering/non-replaced-elements/sections-and-headings",
+ "lists": "html/rendering/non-replaced-elements/lists",
+ "tables": "html/rendering/non-replaced-elements/tables",
+ "form-controls": "html/rendering/non-replaced-elements/form-controls",
+ "the-hr-element-0": "html/rendering/non-replaced-elements/the-hr-element-0",
+ "the-fieldset-element-0": "html/rendering/non-replaced-elements/the-fieldset-element-0",
+ "replaced-elements": "html/rendering/replaced-elements",
+ "embedded-content-1": "html/rendering/replaced-elements/embedded-content-1",
+ "images": "html/rendering/replaced-elements/images",
+ "attributes-for-embedded-content-and-images": "html/rendering/replaced-elements/attributes-for-embedded-content-and-images",
+ "image-maps-0": "html/rendering/replaced-elements/image-maps-0",
+ "toolbars-0": "html/rendering/replaced-elements/toolbars-0",
+ "bindings": "html/rendering/bindings",
+ "introduction-9": "html/rendering/bindings/introduction-9",
+ "the-button-element-0": "html/rendering/bindings/the-button-element-0",
+ "the-details-element-0": "html/rendering/bindings/the-details-element-0",
+ "the-input-element-as-a-text-entry-widget": "html/rendering/bindings/the-input-element-as-a-text-entry-widget",
+ "the-input-element-as-domain-specific-widgets": "html/rendering/bindings/the-input-element-as-domain-specific-widgets",
+ "the-input-element-as-a-range-control": "html/rendering/bindings/the-input-element-as-a-range-control",
+ "the-input-element-as-a-color-well": "html/rendering/bindings/the-input-element-as-a-color-well",
+ "the-input-element-as-a-checkbox-and-radio-button-widgets": "html/rendering/bindings/the-input-element-as-a-checkbox-and-radio-button-widgets",
+ "the-input-element-as-a-file-upload-control": "html/rendering/bindings/the-input-element-as-a-file-upload-control",
+ "the-input-element-as-a-button": "html/rendering/bindings/the-input-element-as-a-button",
+ "the-marquee-element": "html/rendering/bindings/the-marquee-element",
+ "the-meter-element-0": "html/rendering/bindings/the-meter-element-0",
+ "the-progress-element-0": "html/rendering/bindings/the-progress-element-0",
+ "the-select-element-0": "html/rendering/bindings/the-select-element-0",
+ "the-textarea-element-0": "html/rendering/bindings/the-textarea-element-0",
+ "the-keygen-element-0": "html/rendering/bindings/the-keygen-element-0",
+ "frames-and-framesets": "html/rendering/frames-and-framesets",
+ "interactive-media": "html/rendering/interactive-media",
+ "links,-forms,-and-navigation": "html/rendering/interactive-media/links-forms-and-navigation",
+ "the-title-attribute-0": "html/rendering/interactive-media/the-title-attribute-0",
+ "editing-hosts": "html/rendering/interactive-media/editing-hosts",
+ "text-rendered-in-native-user-interfaces": "html/rendering/interactive-media/text-rendered-in-native-user-interfaces",
+ "print-media": "html/rendering/print-media",
+ "unstyled-xml-documents": "html/rendering/unstyled-xml-documents",
+ "obsolete": "html/obsolete",
+ "obsolete-but-conforming-features": "html/obsolete/obsolete-but-conforming-features",
+ "warnings-for-obsolete-but-conforming-features": "html/obsolete/obsolete-but-conforming-features/warnings-for-obsolete-but-conforming-features",
+ "non-conforming-features": "html/obsolete/non-conforming-features",
+ "requirements-for-implementations": "html/obsolete/requirements-for-implementations",
+ "the-applet-element": "html/obsolete/requirements-for-implementations/the-applet-element",
+ "the-marquee-element-0": "html/obsolete/requirements-for-implementations/the-marquee-element-0",
+ "frames": "html/obsolete/requirements-for-implementations/frames",
+ "other-elements,-attributes-and-apis": "html/obsolete/requirements-for-implementations/other-elements-attributes-and-apis",
+ "iana": "microdata/iana",
+ "text/html": "html/iana/text-html",
+ "multipart/x-mixed-replace": "html/iana/multipart-x-mixed-replace",
+ "application/xhtml+xml": "html/iana/application-xhtml-xml",
+ "application/x-www-form-urlencoded": "html/iana/application-x-www-form-urlencoded",
+ "text/cache-manifest": "html/iana/text-cache-manifest",
+ "ping-to": "html/iana/ping-to",
+ "web+-scheme-prefix": "html/iana/web-scheme-prefix",
+ "the-canvas-state": "canvas2d/the-canvas-state",
+ "drawingstyle-objects": "canvas2d/drawingstyle-objects",
+ "line-styles": "canvas2d/line-styles",
+ "text-styles": "canvas2d/text-styles",
+ "building-paths": "canvas2d/building-paths",
+ "path-objects": "canvas2d/path-objects",
+ "transformations": "canvas2d/transformations",
+ "fill-and-stroke-styles": "canvas2d/fill-and-stroke-styles",
+ "drawing-rectangles-to-the-canvas": "canvas2d/drawing-rectangles-to-the-canvas",
+ "drawing-text-to-the-canvas": "canvas2d/drawing-text-to-the-canvas",
+ "drawing-paths-to-the-canvas": "canvas2d/drawing-paths-to-the-canvas",
+ "drawing-images-to-the-canvas": "canvas2d/drawing-images-to-the-canvas",
+ "hit-regions": "canvas2d/hit-regions",
+ "pixel-manipulation": "canvas2d/pixel-manipulation",
+ "compositing": "canvas2d/compositing",
+ "shadows": "canvas2d/shadows",
+ "drawing-model": "canvas2d/drawing-model",
+ "best-practices": "canvas2d/best-practices",
+ "overview": "microdata/introduction/overview",
+ "the-basic-syntax": "microdata/introduction/the-basic-syntax",
+ "typed-items": "microdata/introduction/typed-items",
+ "global-identifiers-for-items": "microdata/introduction/global-identifiers-for-items",
+ "selecting-names-when-defining-vocabularies": "microdata/introduction/selecting-names-when-defining-vocabularies",
+ "using-the-microdata-dom-api": "microdata/introduction/using-the-microdata-dom-api",
+ "encoding-microdata": "microdata/encoding-microdata",
+ "the-microdata-model": "microdata/encoding-microdata/the-microdata-model",
+ "items": "microdata/encoding-microdata/items",
+ "names:-the-itemprop-attribute": "microdata/encoding-microdata/names-the-itemprop-attribute",
+ "values": "microdata/encoding-microdata/values",
+ "associating-names-with-items": "microdata/encoding-microdata/associating-names-with-items",
+ "microdata-and-other-namespaces": "microdata/encoding-microdata/microdata-and-other-namespaces",
+ "microdata-dom-api": "microdata/microdata-dom-api",
+ "htmlpropertiescollection": "microdata/microdata-dom-api/htmlpropertiescollection",
+ "converting-html-to-other-formats": "microdata/converting-html-to-other-formats",
+ "json": "microdata/converting-html-to-other-formats/json"
+} \ No newline at end of file
diff --git a/testing/web-platform/tests/tools/scripts/manifest.js b/testing/web-platform/tests/tools/scripts/manifest.js
new file mode 100644
index 000000000..fbd556825
--- /dev/null
+++ b/testing/web-platform/tests/tools/scripts/manifest.js
@@ -0,0 +1,140 @@
+// grab test metadata from a test file
+function __result_handler() {
+
+ function __get_metadata() {
+ var obj = new Object();
+ var author = [];
+ var assert = [];
+ var help = [];
+ var match = [];
+ var mismatch = [];
+ var flags = [];
+ var nodes;
+
+ nodes = document.querySelectorAll('link[rel="author"]');
+ for (var i = 0; i < nodes.length; i++) {
+ var href = nodes[i].getAttribute("href");
+ var title = nodes[i].getAttribute("title");
+ var s = title;
+ if (href != null) {
+ s += " <" + href + ">";
+ }
+ author.push(s);
+ }
+ if (nodes.length > 0) obj.author = author;
+ nodes = document.querySelectorAll('meta[name="assert"]');
+ for (var i = 0; i < nodes.length; i++) {
+ assert.push(nodes[i].getAttribute("content"));
+ }
+ if (nodes.length > 0) obj.assert = assert;
+ nodes = document.querySelectorAll('link[rel="help"]');
+ for (var i = 0; i < nodes.length; i++) {
+ help.push(nodes[i].getAttribute("href"));
+ }
+ if (nodes.length > 0) obj.help = help;
+ nodes = document.querySelectorAll('link[rel="match"]');
+ for (var i = 0; i < nodes.length; i++) {
+ match.push(nodes[i].getAttribute("href"));
+ }
+ if (nodes.length > 0) obj.match = match;
+ nodes = document.querySelectorAll('link[rel="mismatch"]');
+ for (var i = 0; i < nodes.length; i++) {
+ mismatch.push(nodes[i].getAttribute("href"));
+ }
+ if (nodes.length > 0) obj.match = mismatch;
+ nodes = document.querySelectorAll('meta[name="flags"]');
+ for (var i = 0; i < nodes.length; i++) {
+ flags.push(nodes[i].getAttribute("content"));
+ }
+ if (nodes.length > 0) obj.flags = flags;
+
+ return obj;
+ }
+
+ var meta = __get_metadata();
+ var nodes;
+
+ function copy(obj, prop, arr) {
+ if (typeof arr !== "undefined") {
+ var a = [];
+ for (var i = 0; i<arr.length;i++) {
+ a[i] = arr[i];
+ }
+ obj[prop] = a;
+ }
+ }
+
+
+ var ret = new Object();
+ ret.location = document.location.href;
+ ret.type = "manual";
+ ret.tests = new Object();
+
+ var node = document.querySelector('script[src$="/resources/testharness.js"]');
+ if (node !== null) {
+ ret.type = "script";
+ }
+
+ if (ret.type === "script") {
+ if (typeof metadata_generator === "undefined"
+ || Object.keys(metadata_generator.currentMetadata).length === 0)
+ return "WRAPPER:TRY_AGAIN";
+ else {
+ for (var key in metadata_generator.currentMetadata) {
+ var obj = metadata_generator.currentMetadata[key];
+ var newtest = new Object();
+ ret.tests[key]= newtest;
+ if (typeof obj.help === "undefined") {
+ copy(newtest, "help", meta.help);
+ } else if (typeof obj.help === "string") {
+ newtest.help = [ obj.help ];
+ }
+ if (typeof obj.author === "undefined") {
+ copy(newtest, "author", meta.author);
+ } else if (typeof obj.author === "string") {
+ newtest.author = [ obj.author ];
+ }
+ if (typeof obj.assert === "undefined") {
+ copy(newtest, "assert", meta.assert);
+ } else if (typeof obj.assert === "string") {
+ newtest.assert = [ obj.assert ];
+ }
+ copy(newtest, "match", meta.match);
+ copy(newtest, "mismatch", meta.mismatch);
+ copy(newtest, "flags", meta.flags);
+ }
+ return ret;
+ }
+ } else {
+ var newtest = meta;
+ ret.tests[document.title]= newtest;
+
+ if (typeof newtest.match !== "undefined"
+ || typeof newtest.mismatch !== "undefined") {
+ ret.type = "reftest";
+ }
+
+ return ret;
+ }
+
+}
+
+function __give_up() {
+ var ret = new Object();
+ ret.location = document.location.href;
+ ret.type = "manual";
+ ret.tests = new Object();
+
+ var node = document.querySelector('script[src$="/resources/testharness.js"]');
+ if (node !== null) {
+ ret.type = "script";
+ } else if (typeof newtest.match !== "undefined"
+ || typeof newtest.mismatch !== "undefined") {
+ ret.type = "reftest";
+ }
+
+ var newtest = __get_metadata();
+ ret.tests[document.title]= newtest;
+
+ return ret;
+}
diff --git a/testing/web-platform/tests/tools/scripts/package.json b/testing/web-platform/tests/tools/scripts/package.json
new file mode 100644
index 000000000..5618f6691
--- /dev/null
+++ b/testing/web-platform/tests/tools/scripts/package.json
@@ -0,0 +1,11 @@
+{
+ "name": "convert"
+, "version": "0.0.1"
+, "private": true
+, "dependencies": {
+ "mkdirp": "*"
+ , "wrench": "*"
+ , "underscore": "*"
+ , "jsdom": "*"
+ }
+}
diff --git a/testing/web-platform/tests/tools/scripts/toc.js b/testing/web-platform/tests/tools/scripts/toc.js
new file mode 100644
index 000000000..120d4be03
--- /dev/null
+++ b/testing/web-platform/tests/tools/scripts/toc.js
@@ -0,0 +1,107 @@
+// grab the table of contents filled with all the anchors
+function __result_handler() {
+ function getMap() {
+ var toc_element = document.getElementById("contents").nextElementSibling;
+
+ function getSection() {
+ function getIds(node) {
+ var a = [];
+
+ var nodes = node.querySelectorAll('*[id]');
+ for (var i = 0; i < nodes.length; i++) {
+ a.push(nodes[i].getAttribute("id"));
+ }
+ return a;
+ }
+
+ function getTOCIds() {
+ var a = [];
+
+ var nodes = toc_element.querySelectorAll('li');
+ for (var i = 0; i < nodes.length; i++) {
+ var href = nodes[i].firstElementChild.getAttribute("href");
+ a.push(href.substring(1));
+ }
+ return a;
+ }
+
+ var obj = new Object();
+ var ids = getIds(document);
+ var toc = getTOCIds();
+
+ for (var i = 1; i < toc.length; i++) {
+ var key1 = toc[i-1];
+ var key2 = toc[i];
+ var map = [];
+
+ var index1 = ids.indexOf(key1);
+ var index2 = ids.indexOf(key2);
+
+ if ((index2-index1) > 1) {
+ for (var j = index1+1; j < index2;j++) {
+ map.push(ids[j]);
+ }
+ }
+
+ obj[key1] = map;
+ }
+ {
+ var key = toc[toc.length-1];
+ var index = ids.indexOf(key);
+ var map = [];
+
+ for (var j = index+1; j < ids.length;j++) {
+ map.push(ids[j]);
+ }
+ obj[key] = map;
+ }
+
+ return obj;
+ }
+
+ function section(id) {
+ this.id = id;
+ }
+ function addSubSection(section, sub) {
+ if (typeof section.sections === "undefined") {
+ section.sections = [];
+ }
+ section.sections.push(sub);
+ }
+
+ function li(el, map) {
+ var obj = new section(el.firstElementChild.getAttribute("href").substring(1));
+ obj.title = el.firstElementChild.textContent;
+ var child = el.firstElementChild;
+
+ var m = map[obj.id];
+ for (var i = 0; i < m.length; i++) {
+ var sub = new section(m[i]);
+ addSubSection(obj, sub);
+ }
+ while (child !== null) {
+ if (child.nodeName === "OL") ol(child, obj, map);
+ child = child.nextElementSibling;
+ }
+ return obj;
+ }
+
+ function ol(el, section, map) {
+ var child = el.firstElementChild;
+ while (child !== null) {
+ addSubSection(section, li(child, map));
+ child = child.nextElementSibling;
+ }
+ }
+
+ var map = getSection();
+ var main = new section("___main___");
+ main.title = document.title;
+
+ ol(toc_element, main, map);
+
+ return main;
+ }
+
+ return getMap();
+}
diff --git a/testing/web-platform/tests/tools/scripts/update-directory-structure.js b/testing/web-platform/tests/tools/scripts/update-directory-structure.js
new file mode 100644
index 000000000..7d73d93ac
--- /dev/null
+++ b/testing/web-platform/tests/tools/scripts/update-directory-structure.js
@@ -0,0 +1,106 @@
+
+// convert from old-style test structure to new style
+
+var fs = require("fs")
+, pth = require("path")
+, jsdom = require("jsdom")
+, mkdirp = require("mkdirp").sync
+, testDir = pth.join(__dirname, "../..")
+, MAX_DEPTH = 3
+, id2path = {}
+, limitDepth = {
+ parsing: true
+ }
+;
+
+var sections = {
+ html: "http://www.w3.org/html/wg/drafts/html/master/Overview.html"
+, canvas2d: "http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas/Overview.html"
+, microdata: "http://www.w3.org/html/wg/drafts/microdata/master/Overview.html"
+};
+
+function walkTree ($, $el, list) {
+ $el.find("> li").each(function () {
+ var $li = $(this)
+ , $a = $li.find("> a").first()
+ ;
+ // skip sections that don't have a number
+ if (!/^\s*\d+/.test($a.text())) return;
+ var href = $a.attr("href").replace(/^.*#/, "")
+ , def = {
+ id: href.toLowerCase()
+ .replace(/[^a-z0-9\-]/g, "-")
+ .replace(/\-{2,}/g, "-")
+ .replace(/(?:^\-|\-$)/g, "")
+ , original_id: href
+ }
+ , $ol = $li.find("> ol").first()
+ ;
+ if ($ol.length) {
+ def.children = [];
+ walkTree($, $ol, def.children);
+ }
+ list.push(def);
+ });
+}
+
+function extractSections (sec, secDir, spec, cb) {
+ jsdom.env(
+ spec
+ , function (err, window) {
+ if (err) return cb(err);
+ jsdom.jQueryify(window, "https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js", function (window, $) {
+ if (!$) return cb("$ was not defined");
+ var $root = $("body > ol.toc").first()
+ , tree = []
+ ;
+ walkTree($, $root, tree);
+ cb(null, tree, sec, secDir);
+ }
+ );
+ });
+}
+
+function makeID2Path (base, tree) {
+ for (var i = 0, n = tree.length; i < n; i++) {
+ var sec = tree[i];
+ id2path[sec.original_id] = base;
+ if (sec.children && sec.children.length) makeID2Path(base, sec.children);
+ }
+}
+
+function makeDirs (base, tree, depth) {
+ console.log("Making " + base + " at depth " + depth);
+ for (var i = 0, n = tree.length; i < n; i++) {
+ var sec = tree[i]
+ , path = pth.join(base, sec.id)
+ ;
+ mkdirp(path);
+ fs.writeFileSync(pth.join(path, ".gitkeep"), "", "utf8");
+ id2path[sec.original_id] = path;
+ if (sec.id !== sec.original_id) {
+ fs.writeFileSync(pth.join(path, "original-id.json"), JSON.stringify({ original_id: sec.original_id}), "utf8");
+ }
+ if (sec.children && sec.children.length) {
+ if (depth === MAX_DEPTH || limitDepth[sec.id]) {
+ fs.writeFileSync(pth.join(path, "contains.json"), JSON.stringify(sec.children, null, 4), "utf8");
+ makeID2Path(path, sec.children);
+ }
+ else {
+ makeDirs(path, sec.children, depth + 1);
+ }
+ }
+ }
+}
+
+for (var sec in sections) {
+ var secDir = pth.join(testDir, sec);
+ mkdirp(secDir);
+ console.log("Launching extraction for " + sec);
+ extractSections(sec, secDir, sections[sec], function (err, toc, sec, secDir) {
+ if (err) return console.log("ERROR: " + err);
+ makeDirs(secDir, toc, 1);
+ for (var k in id2path) id2path[k] = id2path[k].replace(testDir + "/", "");
+ fs.writeFileSync(pth.join(__dirname, "id2path.json"), JSON.stringify(id2path, null, 4), "utf8");
+ });
+}