Presentation is loading. Please wait.

Presentation is loading. Please wait.

RDF and XML 인공지능 연구실 한기덕. 2 개요  1. Basic of RDF  2. Example of RDF  3. How XML Namespaces Work  4. The Abbreviated RDF Syntax  5. RDF Resource Collections.

Similar presentations


Presentation on theme: "RDF and XML 인공지능 연구실 한기덕. 2 개요  1. Basic of RDF  2. Example of RDF  3. How XML Namespaces Work  4. The Abbreviated RDF Syntax  5. RDF Resource Collections."— Presentation transcript:

1 RDF and XML 인공지능 연구실 한기덕

2 2 개요  1. Basic of RDF  2. Example of RDF  3. How XML Namespaces Work  4. The Abbreviated RDF Syntax  5. RDF Resource Collections  6. Reified Statements

3 3 Basic of RDF  The triples of RDF consist of the three parts of the graph: the resource, the property, and the property value.  Constants (String values) may be included; they are called literals.  A relationship between a resource and a literal is expressed by a statement, which connects a subject with an object via a predicate

4 4 Basic of RDF  Ex  The author of this book is Johan Hjelm Subject (Resource) This book Predicate (Property) Author Object expresses (Property value, Literal) Johan Hjelm

5 5 Basic of RDF  The difference from traditional predicate logic is that the syntax of RDF is declared in the RDF Schema, which means it is specific to the application instead of general, like predicate logic.  The RDF Schema is used to define the set of resource and literal values. It creates the structure which you later fill with your description.

6 6 Example of RDF  Here is simple RDF graph: –http://www.wireless-information.net -> Creator -> Johan Hjelmhttp://www.wireless-information.net –Creator of http://www.wireless-information.net is Johan Hjelmhttp://www.wireless-information.net

7 7 Example of RDF  We might also want to make clear that we meant creator in some special, well-defined sense, by using a special element, dc:Creator (as opposed to biblical:Creator, for instance).  Of course, then we would have to declare where the definition of that special element came from.  This is done using XML namespaces in the XML encoding of the RDF graph.

8 8 Example of RDF 

9 9 Example of RDF  –The XML declaration shows that this is XML, and declares which version it is.  <rdf:RDF xmlns:rdf=“http://www.w3.org..” –The rdf element begins here: It encapsulates the actual statement and is followed by the namespace declaration. It also the RDF namespace (i.e., where to find out what all tags prefixed with rdf: mean)

10 10 Example of RDF  Xmlns:dc=“ http://purl.org/dc/elements...”http://purl.org/dc/elements –The second namespace declaration declares the Dublin Core namespace, here prefixed with dc:. Both namespace declarations are attributes on the rdf element.  http://www.wireless –The rdf:Description elements declares which resource the statement is about.

11 11 Example of RDF  http://johanhjelm.com/ –The dc:Creator element contains the value of the dc:Creator property. –There can be more properties for the same resource.

12 12 How XML Namespaces Work  XML namespaces identify a set of element names by using prefixes in the RDF code and declaring the namespace in the head of the document.  A namespaces is declared using a family of reserved attributes. Such an attribute’s name must either be xmlns or have xmlns: as a prefix (these two are reserved, but you can use any other prefix for your namespaces).

13 13 The Abbreviated RDF Syntax  about=“ http://www.wireless-..” > johanhjelm.com http://www.wireless-  And the abbreviated syntax looks like this:  http://www.wireless-

14 14 RDF Resource Collections  Bag is an unordered list of resource (URIs) or atomic values (literals, i.e., strings). It is used to declare that a property has multiple values; the order of the values does not matter, and there can be duplicates of resources and duplicate values in literals.

15 15 RDF Resource Collections  Sequence is an ordered list of resources or atomic values (literals). It works just like any numbered list: the order is significant. It is still possible to have duplicates of the same value, however. The Sequence is used to declare that a property has multiple values.

16 16 RDF Resource Collections  Alternative is a list of resources or values that represent possible alternatives for the (single) value of a property. An application using a property whose value is an Alternative collection is aware that it can choose any one of the items in the list as appropriate.

17 17 Reified Statements  There is a mechanism in RDF to make statements about statements (“he said that she said”). In philosophy, this is called a reified statement.

18 18 Reified Statements  xmlns=“ http://www.w3.org/1999/...” xmlns:rdf=“ http://www.w3.org/1999/...” xmlns:dc=“ http://purl.org/metadata/dc..” xmlns:l=“ http://mycorp.com/schemas..” http://www.w3.org/1999/ http://purl.org/metadata/dc  The page Jan97.html in the site www.Webnut.net has a Dublin Core Subject that is Library Science, 020 according to the Dewey Decimal Codewww.Webnut.net

19 19 Reified Statements  The different namespaces make the elements unique, using the namespace mechanism. Each set of elements-the vocabulary- has to be described by a schema, which contains more information than what is available in the DTD.  The RDF Schema language describes the parameters of the elements, but the formal description of data types has to be done in the XML Schema language, if you want to do it at the same level as data types I programming languages.

20 20 Reified Statements  To further illustrate how to use aggregates, consider an example of a document with two authors specified alphabetically, a title specified in two different languages, and having two equivalent locations on the Web:  Mary Andrew Jacky Crystal http://www.w3.org

21 21 Reified Statements  The Coolest Web Page I1 Pagio di Web Fuba


Download ppt "RDF and XML 인공지능 연구실 한기덕. 2 개요  1. Basic of RDF  2. Example of RDF  3. How XML Namespaces Work  4. The Abbreviated RDF Syntax  5. RDF Resource Collections."

Similar presentations


Ads by Google