File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -691,7 +691,7 @@ while ${attribute.value} and ${activeSubjectValue} where found.`);
691
691
}
692
692
693
693
// Set the triple term value if we were collecting triple terms
694
- if ( poppedTag . childrenTagsToTripleTerms && poppedTag . predicate ) {
694
+ if ( poppedTag . childrenTagsToTripleTerms && poppedTag . predicate && poppedTag . rdfVersion ) {
695
695
if ( poppedTag . childrenTripleTerms . length !== 1 ) {
696
696
throw this . newParseError ( `Expected exactly one triple term in rdf:parseType="Triple" but got ${ poppedTag . childrenTripleTerms . length } ` ) ;
697
697
}
Original file line number Diff line number Diff line change @@ -2617,6 +2617,24 @@ abc`)).rejects.toBeTruthy();
2617
2617
] ) ;
2618
2618
} ) ;
2619
2619
2620
+ // 2.19
2621
+ it ( 'on property elements with rdf:parseType="Triple" without rdf:version' , async ( ) => {
2622
+ const array = await parse ( parser , `<?xml version="1.0"?>
2623
+ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
2624
+ xmlns:ex="http://example.org/stuff/1.0/"
2625
+ xml:base="http://example.org/triples/">
2626
+ <rdf:Description rdf:about="http://example.org/">
2627
+ <ex:prop rdf:parseType="Triple">
2628
+ <rdf:Description rdf:about="http://example.org/stuff/1.0/s">
2629
+ <ex:p rdf:resource="http://example.org/stuff/1.0/o" />
2630
+ </rdf:Description>
2631
+ </ex:prop>
2632
+ </rdf:Description>
2633
+ </rdf:RDF>` ) ;
2634
+ return expect ( array )
2635
+ . toBeRdfIsomorphic ( [ ] ) ;
2636
+ } ) ;
2637
+
2620
2638
it ( 'on property elements with rdf:parseType="Triple" with blank subject' , async ( ) => {
2621
2639
const array = await parse ( parser , `<?xml version="1.0"?>
2622
2640
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
You can’t perform that action at this time.
0 commit comments