Skip to content

Commit c21279d

Browse files
Support namespace declaration on typed elements
1 parent c44d146 commit c21279d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/RdfXmlParser-test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,19 @@ abc`)).rejects.toBeTruthy();
982982
]);
983983
});
984984

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+
985998
it('cdata support', async () => {
986999
return expect(await parse(parser, `<?xml version="1.0"?>
9871000
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dct="http://purl.org/dc/terms/" >

0 commit comments

Comments
 (0)