@@ -930,20 +930,71 @@ abc`)).rejects.toBeTruthy();
930930 ] ) ;
931931 } ) ;
932932
933-
934- it ( 'declaration of the namespace on the element' , async ( ) => {
933+ it ( 'declaration of the default namespace on the property element' , async ( ) => {
935934 return expect ( await parse ( parser , `<?xml version="1.0"?>
936935<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 ">
936+ <rdf:Description rdf:about="http://example.com ">
938937 <title xmlns="http://purl.org/dc/terms/" xml:lang="en">RDF1.1 XML Syntax</title>
939938 </rdf:Description>
940939</rdf:RDF>` ) )
941940 . toBeRdfIsomorphic ( [
942- quad ( 'http://www.w3.org/TR/rdf-syntax-grammar ' ,
941+ quad ( 'http://example.com ' ,
943942 'http://purl.org/dc/terms/title' , '"RDF1.1 XML Syntax"@en' ) ,
944943 ] ) ;
945944 } ) ;
946945
946+ it ( 'declaration of the namespace on the property element' , async ( ) => {
947+ return expect ( await parse ( parser , `<?xml version="1.0"?>
948+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
949+ <rdf:Description rdf:about="http://example.com">
950+ <dct:title xmlns:dct="http://purl.org/dc/terms/" xml:lang="en">RDF1.1 XML Syntax</dct:title>
951+ </rdf:Description>
952+ </rdf:RDF>` ) )
953+ . toBeRdfIsomorphic ( [
954+ quad ( 'http://example.com' ,
955+ 'http://purl.org/dc/terms/title' , '"RDF1.1 XML Syntax"@en' ) ,
956+ ] ) ;
957+ } ) ;
958+
959+ it ( 'declaration of the namespace on the resource element' , async ( ) => {
960+ return expect ( await parse ( parser , `<?xml version="1.0"?>
961+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
962+ <rdf:Description rdf:about="http://example.com" xmlns:dct="http://purl.org/dc/terms/">
963+ <dct:title xml:lang="en">RDF1.1 XML Syntax</dct:title>
964+ </rdf:Description>
965+ </rdf:RDF>` ) )
966+ . toBeRdfIsomorphic ( [
967+ quad ( 'http://example.com' ,
968+ 'http://purl.org/dc/terms/title' , '"RDF1.1 XML Syntax"@en' ) ,
969+ ] ) ;
970+ } ) ;
971+
972+ it ( 'declaration of the default namespace on the resource element' , async ( ) => {
973+ return expect ( await parse ( parser , `<?xml version="1.0"?>
974+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
975+ <rdf:Description rdf:about="http://example.com" xmlns="http://purl.org/dc/terms/">
976+ <title xml:lang="en">RDF1.1 XML Syntax</title>
977+ </rdf:Description>
978+ </rdf:RDF>` ) )
979+ . toBeRdfIsomorphic ( [
980+ quad ( 'http://example.com' ,
981+ 'http://purl.org/dc/terms/title' , '"RDF1.1 XML Syntax"@en' ) ,
982+ ] ) ;
983+ } ) ;
984+
985+
986+ it ( 'declaration of the namespace on a typed resource element' , async ( ) => {
987+ return expect ( await parse ( parser , `<?xml version="1.0"?>
988+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
989+ <dct:Standard rdf:about="http://example.com" xmlns:dct="http://purl.org/dc/terms/">
990+ </dct:Standard>
991+ </rdf:RDF>` ) )
992+ . toBeRdfIsomorphic ( [
993+ quad ( 'http://example.com' ,
994+ 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type' , 'http://purl.org/dc/terms/Standard' ) ,
995+ ] ) ;
996+ } ) ;
997+
947998 it ( 'cdata support' , async ( ) => {
948999 return expect ( await parse ( parser , `<?xml version="1.0"?>
9491000<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dct="http://purl.org/dc/terms/" >
@@ -957,7 +1008,6 @@ abc`)).rejects.toBeTruthy();
9571008 ] ) ;
9581009 } ) ;
9591010
960-
9611011 it ( 'DOCTYPE and ENTITY\'s' , async ( ) => {
9621012 return expect ( await parse ( parser , `<!DOCTYPE rdf:RDF
9631013[<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
0 commit comments