diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-svg-forgiving-inc.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-svg-forgiving-inc.rnc index c08a94acc..94b714f77 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-svg-forgiving-inc.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-svg-forgiving-inc.rnc @@ -19,7 +19,9 @@ svg = element svg { svg.inner & svg.attrs } svg.attrs = - ( svg.epubtype.allowed.attrs ) + ( svg.epubtype.allowed.attrs + & epub.prefix.attr.ns? + ) svg.inner = ( svg.any.inner ) @@ -35,7 +37,7 @@ svg.generic.attr = attribute * - ( id - | epub:type + | epub:* ) { text } # Attribute list of elements where `epub:type` is allowed diff --git a/src/test/resources/epub3/06-content-document/content-document-svg.feature b/src/test/resources/epub3/06-content-document/content-document-svg.feature index 413677a93..20f65df46 100644 --- a/src/test/resources/epub3/06-content-document/content-document-svg.feature +++ b/src/test/resources/epub3/06-content-document/content-document-svg.feature @@ -51,6 +51,13 @@ Feature: EPUB 3 — Content Documents — SVG And the message contains '"epub:type" not allowed' And no other errors or warnings are reported + Scenario: Report an unknown `epub:*` attribute used in SVG + Given the reporting level is set to usage + When checking document 'unknown-epub-attribute-error.svg' + Then error RSC-005 is reported + And the message contains '"epub:unknown" not allowed' + And no other errors or warnings are reported + ### 6.2.2 SVG requirements diff --git a/src/test/resources/epub3/06-content-document/files/unknown-epub-attribute-error.svg b/src/test/resources/epub3/06-content-document/files/unknown-epub-attribute-error.svg new file mode 100644 index 000000000..aee630744 --- /dev/null +++ b/src/test/resources/epub3/06-content-document/files/unknown-epub-attribute-error.svg @@ -0,0 +1,7 @@ + + + Test + Description + +