From 2b596065a503a3cc90b5e8c2fb47487caeed8c58 Mon Sep 17 00:00:00 2001 From: Dave Reid Date: Thu, 3 Aug 2017 09:39:37 -0500 Subject: [PATCH 1/4] Move updated validator-generated.php to the Spec subdirectory. --- src/Spec/validator-generated.php | 4344 ++++++++++++------------ src/validator-generated.php | 5276 ------------------------------ 2 files changed, 2156 insertions(+), 7464 deletions(-) delete mode 100644 src/validator-generated.php diff --git a/src/Spec/validator-generated.php b/src/Spec/validator-generated.php index 6523ef92..082bb58a 100644 --- a/src/Spec/validator-generated.php +++ b/src/Spec/validator-generated.php @@ -2358,39 +2358,33 @@ public static function createValidationRules() { $o_564->tag_name = 'o:p'; $o_0->tags[] = $o_564; $o_565 = new TagSpec(); - $o_565->tag_name = 'script'; - $o_565->spec_name = 'amp-ad extension .js script'; - $o_565->mandatory_parent = 'head'; + $o_565->tag_name = 'amp-ad'; $o_566 = new AttrSpec(); - $o_566->name = 'async'; - $o_566->mandatory = true; - $o_566->value = ''; + $o_566->name = 'alt'; $o_565->attrs[] = $o_566; $o_567 = new AttrSpec(); - $o_567->name = 'custom-element'; - $o_567->mandatory = true; - $o_567->value = 'amp-ad'; - $o_567->dispatch_key = true; + $o_567->name = 'json'; $o_565->attrs[] = $o_567; $o_568 = new AttrSpec(); $o_568->name = 'src'; - $o_568->mandatory = true; - $o_568->value_regex = 'https://cdn\\.ampproject\\.org/v0/amp-ad-(latest|0\\.1).js'; + $o_569 = new UrlSpec(); + $o_569->allowed_protocol = ['https']; + $o_569->allow_relative = true; + $o_568->value_url = $o_569; $o_565->attrs[] = $o_568; - $o_569 = new AttrSpec(); - $o_569->name = 'type'; - $o_569->value = 'text/javascript'; - $o_565->attrs[] = $o_569; - $o_565->spec_url = 'https://www.ampproject.org/docs/reference/extended/amp-ad.html'; - $o_570 = new CdataSpec(); - $o_571 = new BlackListedCDataRegex(); - $o_571->regex = '.'; - $o_571->error_message = 'contents'; - $o_570->blacklisted_cdata_regex[] = $o_571; - $o_565->cdata = $o_570; + $o_570 = new AttrSpec(); + $o_570->name = 'type'; + $o_570->mandatory = true; + $o_565->attrs[] = $o_570; + $o_565->attr_lists = ['extended-amp-global']; + $o_565->spec_url = 'https://www.ampproject.org/docs/reference/amp-ad.html'; + $o_571 = new AmpLayout(); + $o_571->supported_layouts = [AmpLayoutLayout::FILL, AmpLayoutLayout::FIXED, AmpLayoutLayout::FIXED_HEIGHT, AmpLayoutLayout::FLEX_ITEM, AmpLayoutLayout::NODISPLAY, AmpLayoutLayout::RESPONSIVE]; + $o_565->amp_layout = $o_571; + $o_565->disallowed_ancestor = ['amp-sidebar']; $o_0->tags[] = $o_565; $o_572 = new TagSpec(); - $o_572->tag_name = 'amp-ad'; + $o_572->tag_name = 'amp-embed'; $o_573 = new AttrSpec(); $o_573->name = 'alt'; $o_572->attrs[] = $o_573; @@ -2409,717 +2403,723 @@ public static function createValidationRules() { $o_577->mandatory = true; $o_572->attrs[] = $o_577; $o_572->attr_lists = ['extended-amp-global']; - $o_572->spec_url = 'https://www.ampproject.org/docs/reference/amp-ad.html'; + $o_572->spec_url = 'https://www.ampproject.org/docs/reference/amp-embed.html'; $o_578 = new AmpLayout(); $o_578->supported_layouts = [AmpLayoutLayout::FILL, AmpLayoutLayout::FIXED, AmpLayoutLayout::FIXED_HEIGHT, AmpLayoutLayout::FLEX_ITEM, AmpLayoutLayout::NODISPLAY, AmpLayoutLayout::RESPONSIVE]; $o_572->amp_layout = $o_578; $o_572->disallowed_ancestor = ['amp-sidebar']; $o_0->tags[] = $o_572; $o_579 = new TagSpec(); - $o_579->tag_name = 'amp-embed'; + $o_579->tag_name = 'amp-img'; $o_580 = new AttrSpec(); $o_580->name = 'alt'; $o_579->attrs[] = $o_580; $o_581 = new AttrSpec(); - $o_581->name = 'json'; + $o_581->name = 'attribution'; $o_579->attrs[] = $o_581; $o_582 = new AttrSpec(); - $o_582->name = 'src'; - $o_583 = new UrlSpec(); - $o_583->allowed_protocol = ['https']; - $o_583->allow_relative = true; - $o_582->value_url = $o_583; + $o_582->name = 'placeholder'; $o_579->attrs[] = $o_582; - $o_584 = new AttrSpec(); - $o_584->name = 'type'; - $o_584->mandatory = true; - $o_579->attrs[] = $o_584; - $o_579->attr_lists = ['extended-amp-global']; - $o_579->spec_url = 'https://www.ampproject.org/docs/reference/amp-embed.html'; - $o_585 = new AmpLayout(); - $o_585->supported_layouts = [AmpLayoutLayout::FILL, AmpLayoutLayout::FIXED, AmpLayoutLayout::FIXED_HEIGHT, AmpLayoutLayout::FLEX_ITEM, AmpLayoutLayout::NODISPLAY, AmpLayoutLayout::RESPONSIVE]; - $o_579->amp_layout = $o_585; - $o_579->disallowed_ancestor = ['amp-sidebar']; + $o_579->attr_lists = ['extended-amp-global', 'mandatory-src-or-srcset']; + $o_579->spec_url = 'https://www.ampproject.org/docs/reference/amp-img.html'; + $o_583 = new AmpLayout(); + $o_583->supported_layouts = [AmpLayoutLayout::FILL, AmpLayoutLayout::FIXED, AmpLayoutLayout::FIXED_HEIGHT, AmpLayoutLayout::FLEX_ITEM, AmpLayoutLayout::NODISPLAY, AmpLayoutLayout::RESPONSIVE]; + $o_579->amp_layout = $o_583; $o_0->tags[] = $o_579; - $o_586 = new TagSpec(); - $o_586->tag_name = 'amp-img'; - $o_587 = new AttrSpec(); - $o_587->name = 'alt'; - $o_586->attrs[] = $o_587; - $o_588 = new AttrSpec(); - $o_588->name = 'attribution'; - $o_586->attrs[] = $o_588; + $o_584 = new TagSpec(); + $o_584->tag_name = 'amp-pixel'; + $o_585 = new AttrSpec(); + $o_585->name = 'src'; + $o_585->mandatory = true; + $o_586 = new UrlSpec(); + $o_586->allowed_protocol = ['https']; + $o_586->allow_relative = true; + $o_585->value_url = $o_586; + $o_584->attrs[] = $o_585; + $o_584->attr_lists = ['extended-amp-global']; + $o_584->spec_url = 'https://www.ampproject.org/docs/reference/amp-pixel.html'; + $o_587 = new AmpLayout(); + $o_587->supported_layouts = [AmpLayoutLayout::FIXED, AmpLayoutLayout::NODISPLAY]; + $o_587->defines_default_width = true; + $o_587->defines_default_height = true; + $o_584->amp_layout = $o_587; + $o_584->disallowed_ancestor = ['amp-sidebar']; + $o_0->tags[] = $o_584; + $o_588 = new TagSpec(); + $o_588->tag_name = 'amp-video'; $o_589 = new AttrSpec(); - $o_589->name = 'placeholder'; - $o_586->attrs[] = $o_589; - $o_586->attr_lists = ['extended-amp-global', 'mandatory-src-or-srcset']; - $o_586->spec_url = 'https://www.ampproject.org/docs/reference/amp-img.html'; - $o_590 = new AmpLayout(); - $o_590->supported_layouts = [AmpLayoutLayout::FILL, AmpLayoutLayout::FIXED, AmpLayoutLayout::FIXED_HEIGHT, AmpLayoutLayout::FLEX_ITEM, AmpLayoutLayout::NODISPLAY, AmpLayoutLayout::RESPONSIVE]; - $o_586->amp_layout = $o_590; - $o_0->tags[] = $o_586; - $o_591 = new TagSpec(); - $o_591->tag_name = 'amp-pixel'; + $o_589->name = 'alt'; + $o_588->attrs[] = $o_589; + $o_590 = new AttrSpec(); + $o_590->name = 'attribution'; + $o_588->attrs[] = $o_590; + $o_591 = new AttrSpec(); + $o_591->name = 'autoplay'; + $o_591->value = ''; + $o_588->attrs[] = $o_591; $o_592 = new AttrSpec(); - $o_592->name = 'src'; - $o_592->mandatory = true; - $o_593 = new UrlSpec(); - $o_593->allowed_protocol = ['https']; - $o_593->allow_relative = true; - $o_592->value_url = $o_593; - $o_591->attrs[] = $o_592; - $o_591->attr_lists = ['extended-amp-global']; - $o_591->spec_url = 'https://www.ampproject.org/docs/reference/amp-pixel.html'; - $o_594 = new AmpLayout(); - $o_594->supported_layouts = [AmpLayoutLayout::FIXED, AmpLayoutLayout::NODISPLAY]; - $o_594->defines_default_width = true; - $o_594->defines_default_height = true; - $o_591->amp_layout = $o_594; - $o_591->disallowed_ancestor = ['amp-sidebar']; - $o_0->tags[] = $o_591; - $o_595 = new TagSpec(); - $o_595->tag_name = 'amp-video'; + $o_592->name = 'controls'; + $o_592->value = ''; + $o_588->attrs[] = $o_592; + $o_593 = new AttrSpec(); + $o_593->name = 'loop'; + $o_593->value = ''; + $o_588->attrs[] = $o_593; + $o_594 = new AttrSpec(); + $o_594->name = 'muted'; + $o_594->value = ''; + $o_588->attrs[] = $o_594; + $o_595 = new AttrSpec(); + $o_595->name = 'placeholder'; + $o_588->attrs[] = $o_595; $o_596 = new AttrSpec(); - $o_596->name = 'alt'; - $o_595->attrs[] = $o_596; + $o_596->name = 'poster'; + $o_588->attrs[] = $o_596; $o_597 = new AttrSpec(); - $o_597->name = 'attribution'; - $o_595->attrs[] = $o_597; + $o_597->name = 'preload'; + $o_597->value_regex = '(none|metadata|auto|)'; + $o_588->attrs[] = $o_597; $o_598 = new AttrSpec(); - $o_598->name = 'autoplay'; - $o_598->value = ''; - $o_595->attrs[] = $o_598; - $o_599 = new AttrSpec(); - $o_599->name = 'controls'; - $o_599->value = ''; - $o_595->attrs[] = $o_599; - $o_600 = new AttrSpec(); - $o_600->name = 'loop'; - $o_600->value = ''; - $o_595->attrs[] = $o_600; - $o_601 = new AttrSpec(); - $o_601->name = 'muted'; - $o_601->value = ''; - $o_595->attrs[] = $o_601; + $o_598->name = 'src'; + $o_599 = new UrlSpec(); + $o_599->allowed_protocol = ['https']; + $o_599->allow_relative = true; + $o_598->value_url = $o_599; + $o_588->attrs[] = $o_598; + $o_588->attr_lists = ['extended-amp-global']; + $o_588->spec_url = 'https://www.ampproject.org/docs/reference/amp-video.html'; + $o_600 = new AmpLayout(); + $o_600->supported_layouts = [AmpLayoutLayout::FILL, AmpLayoutLayout::FIXED, AmpLayoutLayout::FIXED_HEIGHT, AmpLayoutLayout::FLEX_ITEM, AmpLayoutLayout::NODISPLAY, AmpLayoutLayout::RESPONSIVE]; + $o_588->amp_layout = $o_600; + $o_588->disallowed_ancestor = ['amp-sidebar']; + $o_0->tags[] = $o_588; + $o_601 = new TagSpec(); + $o_601->tag_name = 'script'; + $o_601->spec_name = 'amp-access extension .js script'; + $o_601->mandatory_parent = 'head'; $o_602 = new AttrSpec(); - $o_602->name = 'placeholder'; - $o_595->attrs[] = $o_602; + $o_602->name = 'async'; + $o_602->mandatory = true; + $o_602->value = ''; + $o_601->attrs[] = $o_602; $o_603 = new AttrSpec(); - $o_603->name = 'poster'; - $o_595->attrs[] = $o_603; + $o_603->name = 'custom-element'; + $o_603->mandatory = true; + $o_603->value = 'amp-access'; + $o_603->dispatch_key = true; + $o_601->attrs[] = $o_603; $o_604 = new AttrSpec(); - $o_604->name = 'preload'; - $o_604->value_regex = '(none|metadata|auto|)'; - $o_595->attrs[] = $o_604; + $o_604->name = 'src'; + $o_604->mandatory = true; + $o_604->value_regex = 'https://cdn\\.ampproject\\.org/v0/amp-access-(latest|0\\.1).js'; + $o_601->attrs[] = $o_604; $o_605 = new AttrSpec(); - $o_605->name = 'src'; - $o_606 = new UrlSpec(); - $o_606->allowed_protocol = ['https']; - $o_606->allow_relative = true; - $o_605->value_url = $o_606; - $o_595->attrs[] = $o_605; - $o_595->attr_lists = ['extended-amp-global']; - $o_595->spec_url = 'https://www.ampproject.org/docs/reference/amp-video.html'; - $o_607 = new AmpLayout(); - $o_607->supported_layouts = [AmpLayoutLayout::FILL, AmpLayoutLayout::FIXED, AmpLayoutLayout::FIXED_HEIGHT, AmpLayoutLayout::FLEX_ITEM, AmpLayoutLayout::NODISPLAY, AmpLayoutLayout::RESPONSIVE]; - $o_595->amp_layout = $o_607; - $o_595->disallowed_ancestor = ['amp-sidebar']; - $o_0->tags[] = $o_595; + $o_605->name = 'type'; + $o_605->value = 'text/javascript'; + $o_601->attrs[] = $o_605; + $o_601->spec_url = 'https://www.ampproject.org/docs/reference/extended/amp-access.html'; + $o_606 = new CdataSpec(); + $o_607 = new BlackListedCDataRegex(); + $o_607->regex = '.'; + $o_607->error_message = 'contents'; + $o_606->blacklisted_cdata_regex[] = $o_607; + $o_601->cdata = $o_606; + $o_0->tags[] = $o_601; $o_608 = new TagSpec(); $o_608->tag_name = 'script'; - $o_608->spec_name = 'amp-access extension .js script'; + $o_608->spec_name = 'amp-access extension .json script'; $o_608->mandatory_parent = 'head'; $o_609 = new AttrSpec(); - $o_609->name = 'async'; + $o_609->name = 'id'; $o_609->mandatory = true; - $o_609->value = ''; + $o_609->value = 'amp-access'; + $o_609->dispatch_key = true; $o_608->attrs[] = $o_609; $o_610 = new AttrSpec(); - $o_610->name = 'custom-element'; + $o_610->name = 'type'; $o_610->mandatory = true; - $o_610->value = 'amp-access'; - $o_610->dispatch_key = true; + $o_610->value = 'application/json'; $o_608->attrs[] = $o_610; - $o_611 = new AttrSpec(); - $o_611->name = 'src'; - $o_611->mandatory = true; - $o_611->value_regex = 'https://cdn\\.ampproject\\.org/v0/amp-access-(latest|0\\.1).js'; - $o_608->attrs[] = $o_611; - $o_612 = new AttrSpec(); - $o_612->name = 'type'; - $o_612->value = 'text/javascript'; - $o_608->attrs[] = $o_612; - $o_608->spec_url = 'https://www.ampproject.org/docs/reference/extended/amp-access.html'; - $o_613 = new CdataSpec(); - $o_614 = new BlackListedCDataRegex(); - $o_614->regex = '.'; - $o_614->error_message = 'contents'; - $o_613->blacklisted_cdata_regex[] = $o_614; - $o_608->cdata = $o_613; + $o_608->spec_url = 'https://www.ampproject.org/docs/reference/extended/amp-access-spec.html'; + $o_611 = new CdataSpec(); + $o_612 = new BlackListedCDataRegex(); + $o_612->regex = '