Skip to content

Commit 4a55f6f

Browse files
committed
Ignore its:version while parsing
1 parent 1ba33a3 commit 4a55f6f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/RdfXmlParser.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,9 @@ while ${attribute.value} and ${activeSubjectValue} where found.`);
553553
} else if (propertyAttribute.uri === RdfXmlParser.ITS && propertyAttribute.local === 'dir') {
554554
this.setDirection(activeTag, propertyAttribute.value);
555555
continue;
556+
} else if (propertyAttribute.uri === RdfXmlParser.ITS && propertyAttribute.local === 'version') {
557+
// Ignore its:version
558+
continue;
556559
}
557560

558561
// Interpret attributes at this point as properties via implicit blank nodes on the property,

test/RdfXmlParser-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,7 @@ abc`)).rejects.toBeTruthy();
15971597
xmlns:its="http://www.w3.org/2005/11/its"
15981598
rdf:version="1.2">
15991599
<rdf:Description rdf:about="http://www.w3.org/TR/rdf-syntax-grammar">
1600-
<dc:title xml:lang="en-us" its:dir="rtl">RDF 1.1 XML Syntax</dc:title>
1600+
<dc:title xml:lang="en-us" its:dir="rtl" its:version="2.0">RDF 1.1 XML Syntax</dc:title>
16011601
</rdf:Description>
16021602
</rdf:RDF>`);
16031603
return expect(array)

0 commit comments

Comments
 (0)