Skip to content

Commit 4357f10

Browse files
committed
1 parent 32c9567 commit 4357f10

File tree

4 files changed

+40
-0
lines changed

4 files changed

+40
-0
lines changed

etc/registry.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,10 @@
44
"additionalType": {"subPropertyOf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"}
55
}
66
},
7+
"https://schema.org/": {
8+
"properties": {
9+
"additionalType": {"subPropertyOf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"}
10+
}
11+
},
712
"http://microformats.org/profile/hcard": {}
813
}

spec/rdfa_reader_spec.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,21 @@
848848

849849
expect(parse(md, vocab_expansion: true)).to be_equivalent_graph(ttl, logger: @logger)
850850
end
851+
852+
it "always expands (schemas)" do
853+
md = %q(
854+
<div itemscope='' itemtype='https://schema.org/Person'>
855+
<link itemprop='additionalType' href='http://xmlns.com/foaf/0.1/Person' />
856+
</div>
857+
)
858+
ttl = %q(
859+
[ a <https://schema.org/Person>, <http://xmlns.com/foaf/0.1/Person>;
860+
<https://schema.org/additionalType> <http://xmlns.com/foaf/0.1/Person>
861+
] .
862+
)
863+
864+
expect(parse(md, vocab_expansion: true)).to be_equivalent_graph(ttl, logger: @logger)
865+
end
851866
end
852867

853868
context "test-files", skip: true do

spec/reader_spec.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,21 @@
858858

859859
expect(parse(md, vocab_expansion: true)).to be_equivalent_graph(ttl, logger: @logger)
860860
end
861+
862+
it "always expands (schemas)" do
863+
md = %q(
864+
<div itemscope='' itemtype='https://schema.org/Person'>
865+
<link itemprop='additionalType' href='http://xmlns.com/foaf/0.1/Person' />
866+
</div>
867+
)
868+
ttl = %q(
869+
[ a <https://schema.org/Person>, <http://xmlns.com/foaf/0.1/Person>;
870+
<https://schema.org/additionalType> <http://xmlns.com/foaf/0.1/Person>
871+
] .
872+
)
873+
874+
expect(parse(md, vocab_expansion: true)).to be_equivalent_graph(ttl, logger: @logger)
875+
end
861876
end
862877

863878
context "test-files" do

spec/test-files/test-registry.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
"additionalType": {"subPropertyOf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"}
1313
}
1414
},
15+
"https://schema.org/": {
16+
"properties": {
17+
"additionalType": {"subPropertyOf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"}
18+
}
19+
},
1520
"http://microformats.org/profile/hcard": {},
1621
"http://vocabulary.unordered/": {
1722
"propertyURI": "vocabulary",

0 commit comments

Comments
 (0)