@prefix < xmlns.com/foaf/0.1/>
Nikolay Korobko A: person
Nikolai Korobko: hasMail <admin@futuri.us>
Nikolai Korobko: hasHomepage < futuri.us>
Nikolai Korobko: hasNik "Nicholass"
Nikolai Korobko "hasPhoto < img-fotki.yandex.ru/get/9/w88lf.8/0_9266_a7b0b5d8_L.jpg>
Nikolai Korobko: hasInterest Web 3.0
Nikolai Korobko: hasInterest "Semantic Network"
Nikolay Korobko: knows: people
(in fact, this scheme does not work!)
Interlude : Namespaces
Namespace (in XML) definition of tags, attributes and their location relative to each other in the document.
For example, take HTML. Lists. The namespace clearly states that <ul> may contain one or more <li>, as well as other elements. Or in the same namespace it is clearly stated that <head> is a descendant of <body> and that <head> cannot contain <img>.
<rdf: RDF xmlns: rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns: foaf = "http://xmlns.com/foaf/0.1/" xmlns: rdfs = "http://www.w3.org/2000/01/rdf-schema#"> <foaf: Person rdf: about = "# JW"> <foaf: name> Korobko Nikolay </ foaf: name> <foaf: mbox rdf: resource = "mailto: admin@futuri.us" /> <foaf: homepage rdf: resource = "http://futuri.us/" /> <foaf: nick> Niholass </ foaf: nick> <foaf: depiction rdf: resource = "http://img-fotki.yandex.ru/get/9/w88lf.8/0_9266_a7b0b5d8_L.jpg" />
<rdf: RDF xmlns: rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns: foaf = "http://xmlns.com/foaf/0.1/" xmlns: rdfs = "http://www.w3.org/2000/01/rdf-schema#"> <foaf: Person rdf: about = "# JW">
<foaf: Person rdf: about = "# JW">
<foaf: name> Korobko Nikolay </ foaf: name>
By the way, I forgot to say, the prefix in the tag (foaf :) indicates what namespace we take it from, because there are coincidences, for example, in the Dublin Core (about it later) and in HTML there is a title element.
<foaf: mbox rdf: resource = "mailto: admin@futuri.us" /> <foaf: homepage rdf: resource = "http://futuri.us/" /> <foaf: nick> Niholass </ foaf: nick> <foaf: depiction rdf: resource = "http://img-fotki.yandex.ru/get/9/w88lf.8/0_9266_a7b0b5d8_L.jpg" />
<foaf: interest> <rdf: Description rdf: about = "http://futuri.us" rdfs: label = "Web 3.0" /> </ foaf: interest> <foaf: interest> <rdf: Description rdf: about = "http://futuri.us" rdfs: label = "Semantic Web" /> </ foaf: interest>
<foaf: knows> <foaf: Person> <foaf: name> Misha Kvakin </ foaf: name> <foaf: homepage rdf: resource = "http://design-freak.com/" /> <rdf: Description rdf: about = "http://www.google.com.ua/search?q=design" rdfs: label = "Design" /> <rdf: Description rdf: about = "http://www.google.com.ua/search?q=Uzability" rdfs: label = "Usability" /> </ foaf: Person> <foaf: Person> <foaf: name> Roman Rybalchenko </ foaf: name> <foaf: homepage rdf: resource = "http://cooluck.kiev.ua" /> <foaf: nick> Cooluck </ foaf: nick> <rdf: Description rdf: about = "http://www.google.com.ua/search?q=SEO" rdfs: label = "SEO" /> </ foaf: Person> </ foaf: knows>
<rdf: RDF xmlns: rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns: foaf = "http://xmlns.com/foaf/0.1/" xmlns: rdfs = "http://www.w3.org/2000/01/rdf-schema#"> <foaf: Person rdf: about = "# JW"> <foaf: name> Korobko Nikolay </ foaf: name> <foaf: mbox rdf: resource = "mailto: admin@futuri.us" /> <foaf: homepage rdf: resource = "http://futuri.us/" /> <foaf: nick> Niholass </ foaf: nick> <foaf: depiction rdf: resource = "http://img-fotki.yandex.ru/get/9/w88lf.8/0_9266_a7b0b5d8_L.jpg" /> <foaf: interest> <rdf: Description rdf: about = "http://futuri.us" rdfs: label = "Web 3.0" /> </ foaf: interest> <foaf: knows> <foaf: Person> <foaf: name> Misha Kvakin </ foaf: name> <foaf: homepage rdf: resource = "http://design-freak.com/" /> <rdf: Description rdf: about = "http://www.google.com.ua/search?q=design" rdfs: label = "Design" /> </ foaf: Person> <foaf: Person> <foaf: name> Roman Rybalchenko </ foaf: name> <foaf: homepage rdf: resource = "http://cooluck.kiev.ua" /> <rdf: Description rdf: about = "http://www.google.com.ua/search?q=SEO" rdfs: label = "SEO" /> </ foaf: Person> </ foaf: knows> </ foaf: Person> </ rdf: RDF>
Source: https://habr.com/ru/post/18263/
All Articles