File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -517,6 +517,7 @@ while ${attribute.value} and ${activeSubjectValue} where found.`);
517
517
// Interpret attributes at this point as properties via implicit blank nodes on the property,
518
518
// but we ignore attributes that have no prefix or known expanded URI
519
519
if ( propertyAttribute . prefix !== 'xml' && propertyAttribute . prefix !== 'xmlns'
520
+ && ( propertyAttribute . prefix !== '' || propertyAttribute . local !== 'xmlns' )
520
521
&& propertyAttribute . uri ) {
521
522
if ( parseType || activeTag . datatype ) {
522
523
throw this . newParseError ( `Found illegal rdf:* properties on property element with attribute: ${
Original file line number Diff line number Diff line change @@ -930,6 +930,22 @@ abc`)).rejects.toBeTruthy();
930
930
] ) ;
931
931
} ) ;
932
932
933
+
934
+ it ( 'declaration of the namespace on the element' , async ( ) => {
935
+ return expect ( await parse ( parser , `<?xml version="1.0"?>
936
+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
937
+ <rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar">
938
+ <title xmlns="http://purl.org/dc/terms/" xml:lang="en">RDF1.1 XML Syntax</title>
939
+ </rdf:Description>
940
+ </rdf:RDF>` ) )
941
+ . toBeRdfIsomorphic ( [
942
+ quad ( 'http://www.w3.org/TR/rdf-syntax-grammar' ,
943
+ 'http://purl.org/dc/terms/title' , '"RDF1.1 XML Syntax"@en' ) ,
944
+ ] ) ;
945
+ } ) ;
946
+
947
+
948
+
933
949
it ( 'DOCTYPE and ENTITY\'s' , async ( ) => {
934
950
return expect ( await parse ( parser , `<!DOCTYPE rdf:RDF
935
951
[<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
You can’t perform that action at this time.
0 commit comments