]> code.delx.au - gnu-emacs-elpa/commitdiff
Add the "integrity" attribute
authorMichael[tm] Smith <mike@w3.org>
Fri, 25 Dec 2015 18:13:43 +0000 (03:13 +0900)
committerMichael[tm] Smith <mike@w3.org>
Fri, 25 Dec 2015 18:13:43 +0000 (03:13 +0900)
Fixes https://github.com/validator/validator/issues/151

common.rnc
core-scripting.rnc
meta.rnc

index e87d49bd2c3fdda5a350abe6c207961e1721fbc2..b105ad785ff19f8b40818f6c061d2fa9de0ffdbd 100644 (file)
@@ -390,6 +390,10 @@ common.attrs.other =
        common.data.source.size.list =
                w:source-size-list
 
+## Subresource Integrity
+       common.data.integrity =
+               string
+
 ## Microdata Properties
   common.data.microdata-properties =
     list { w:microdata-property+ }
index ff64969e1f1aacbead24a57402ff4f014ad69af0..0569d0e58d777919fe71421ec0b8f393772ddac2 100644 (file)
@@ -15,6 +15,7 @@ datatypes w = "http://whattf.org/datatype-draft"
                (       common.attrs
                &       script.attrs.type?
                &       script.attrs.language? # restricted in Schematron
+               &       script.attrs.integrity?
                &       embedded.content.attrs.crossorigin?
                &       (       common.attrs.aria.role.presentation
                        |       common.attrs.aria.role.menuitem
@@ -30,6 +31,7 @@ datatypes w = "http://whattf.org/datatype-draft"
                &       script.attrs.type?
                &       script.attrs.charset?
                &       script.attrs.language? # restricted in Schematron
+               &       script.attrs.integrity?
                &       embedded.content.attrs.crossorigin?
                &       (       common.attrs.aria.role.presentation
                        |       common.attrs.aria.role.menuitem
@@ -59,6 +61,10 @@ datatypes w = "http://whattf.org/datatype-draft"
                        attribute language {
                                string
                        }
+               script.attrs.integrity =
+                       attribute integrity {
+                               common.data.integrity
+                       }
        script.inner.embedded =
                ( common.inner.anything )
        script.inner.imported =
index 92aaf5e09f35b0ec629dc55da4dc7103d3ae07e1..bbb67b445bc37c61929a488041b5ea12c9c8107d 100644 (file)
--- a/meta.rnc
+++ b/meta.rnc
@@ -159,6 +159,7 @@ datatypes w = "http://whattf.org/datatype-draft"
                &       common.attrs.other
                &       link.attrs.href
                &       link.attrs.rel
+               &       link.attrs.integrity?
                &       shared-hyperlink.attrs.hreflang?
                &       shared-hyperlink.attrs.media?
                &       shared-hyperlink.attrs.type?
@@ -178,6 +179,10 @@ datatypes w = "http://whattf.org/datatype-draft"
                        attribute rel {
                                w:link-rel
                        }
+               link.attrs.integrity =
+                       attribute integrity {
+                               common.data.integrity
+                       }
                link.attrs.sizes =
                        attribute sizes {
                                w:string "any" | common.data.sizes