File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,8 @@ Start by creating the ld-query object:
150150var context = LD ( {
151151 " @vocab" : " http://www.schema.org/" ,
152152 " foaf" : " http://xmlns.com/foaf/0.1/" ,
153- " ex" : " http://www.example.org#"
153+ " ex" : " http://www.example.org#" ,
154+ " isbn" : " http://www.isbnsearch.org/isbn/"
154155} );
155156
156157var doc = context ( data );
161162var doc = LD ( data, {
162163 " @vocab" : " http://www.schema.org/" ,
163164 " foaf" : " http://xmlns.com/foaf/0.1/" ,
164- " ex" : " http://www.example.org#"
165+ " ex" : " http://www.example.org#" ,
166+ " isbn" : " http://www.isbnsearch.org/isbn/"
165167} );
166168```
167169
@@ -203,6 +205,10 @@ doc.queryAll("somepropertynotinyourdocument @value") // []
203205
204206doc .query (" ex:favouriteReads[@index=pynchon_gp] name @value" ) // "Gravity's Rainbow"
205207
208+ doc .query (" *[@id=isbn:9780143039945] name @value" ) // "Gravity's Rainbow"
209+ doc .query (" [@id=isbn:9780143039945] name @value" ) // "Gravity's Rainbow"
210+ doc .query (" #isbn:9780143039945 name @value" ) // "Gravity's Rainbow"
211+
206212doc .queryAll (" ex:favouriteReads @index" ) // [ "banks-exc", "pynchon-gr" ]
207213doc .query (" ex:favouriteReads @id" ) // [ "http://www.isbnsearch.org/isbn/9780553575378" ]
208214
You can’t perform that action at this time.
0 commit comments