Skip to content

Commit

Permalink
Support namespace declaration on typed elements
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaspalmer committed Nov 23, 2023
1 parent 01d9811 commit 3c3255e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/RdfXmlParser-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,19 @@ abc`)).rejects.toBeTruthy();
]);
});


it('declaration of the namespace on a typed resource element', async () => {
return expect(await parse(parser, `<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<dct:Standard rdf:about="http://example.com" xmlns:dct="http://purl.org/dc/terms/">
</dct:Standard>
</rdf:RDF>`))
.toBeRdfIsomorphic([
quad('http://example.com',
'http://www.w3.org/1999/02/22-rdf-syntax-ns#type', 'http://purl.org/dc/terms/Standard'),
]);
});

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

0 comments on commit 3c3255e

Please sign in to comment.