diff --git a/Documentation/turtle-intro.html b/Documentation/turtle-intro.html index 9cbcb4c4c..475c0c9de 100644 --- a/Documentation/turtle-intro.html +++ b/Documentation/turtle-intro.html @@ -36,12 +36,12 @@

Using Turtle

Turtle is a language. - It is desiged for expressing data, partuicularly linked data on the web. + It is desiged for expressing data, particularly linked data on the web. Just as HTML is used for linked text, Turtle is used for linked data. Turtle expresses stuff about things. Abstract things, real things, people, documents, So where HTML uses the hash sign like in foo.html#intro to refer to an anchor, which is a part of the document, Turtle uses -the same hash sign to refer to something defined by the dococument, like students.ttl#bob +the same hash sign to refer to something defined by the document, like students.ttl#bob or profile.ttl#me.

@@ -75,7 +75,7 @@

Using Turtle

Prefixes

Turtle uses URIs to identify people all the time, so it has a - way of abbrevating them. + way of abbreviating them. You declare a prefix say at the top of the file, and then use foo: prefix with a colon:

 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
@@ -86,7 +86,7 @@ 

Prefixes

Tip: There are a ste of common prefixes for vocabularies we use a lot in @@@.

-

When you use URIs in angle brackets, then they relative URIs, relative +

When you use URIs in angle brackets, then they are relative URIs, relative to the URI of the current document. So if the document is, say, https://alice.example.com/public/profile.ttl then

@@ -111,7 +111,7 @@

Prefixes

Things like <#me> and <myhome> are local identifiers within the file you are creating. They are like const in a JS file in a way, local identifiers. The business of the data document you are writing - is done in terms of those local identifiers. Becasue local identifiers + is done in terms of those local identifiers. Because local identifiers are used quite a lot, it is useful to declare a prefix, the empty string prefix :, so that they can be just written with a leading colon:

@@ -165,7 +165,7 @@

Property trees

Data Values

-

Above we have shown the triples each expressing the ralationship between things: people +

Above we have shown the triples each expressing the relationship between things: people and classes. You can also put data values in the object position, like the strng "Alice" above. In Turtle (and the RDF data model underneath) values are typed.

@@ -194,7 +194,7 @@

Data Values

These data types cover a lot of values. You can also explictly write something - with and explicit data type from the XML data types @@link standard, XSD. + with an explicit data type from the XML data types @@link standard, XSD. To do that you write the data value as a string, then two carets ^^ and then the XSD datatype itself.

@@ -208,8 +208,8 @@

Data Values

foaf:bithDate @@@ "1990-03-31"^^xsd:date .
-

Its also worth mentioning that URIs are yor freind if you wat to - given email addresses or telephone numbers, as there are RI schemes for those. +

Its also worth mentioning that URIs are your friends if you want to + give email addresses or telephone numbers, as there are URI schemes for those.

@@ -235,7 +235,7 @@

Structure

You can add structure to your data in Turtle using the square brackets [ ... ], which can be read as "Something which has ...". So instead of a flat set of properties like
-  :Alice :homeAddressStreet "Accaia Ave";
+  :Alice :homeAddressStreet "Acacia Ave";
          :homeAddressNumber 123;
          :homeAddressCity "Anytown";
          :homePhone <tel:+1-781-555-1212> .
@@ -246,7 +246,7 @@ 

Structure

   :Alice :home [
             :address [
-                :street "Accaia Ave";
+                :street "Acacia Ave";
                 :number 123;
                 :city "Anytown"
             ]
@@ -254,7 +254,7 @@ 

Structure

] .

This reads in English like "Alice has a home which has an address with -street "Aaccia Avenue", number 123 and city ANytown, and has a phone number of +1785551212." +street "Acacia Avenue", number 123 and city Anytown, and has a phone number of +1785551212."

This sort of tree structure is very common: in JSON the nested things are objects; in XML they are elements. In Turtle they are called blank nodes, @@ -266,7 +266,7 @@

Structure

 :Alice :home _:a .
           _:a address _:b .
-          _:b   street "Accaia Ave";
+          _:b   street "Acacia Ave";
                 number 123;
                 city "Anytown" .
           _a :phone <tel:+1-781-555-1212> .
@@ -280,7 +280,7 @@ 

Lists

They are called collections or lists, and are like LISP lists, or JS or Python arrays.
-<#alice>  foaf:children  ( <#bob> <#charlie>  <#dave>  )  .
+<#alice>  foaf:children  ( <#bob> <#charlie>  <#dave> )  .
 

Imagine we store user input as a string, but separately generate the list of words.

@@ -292,15 +292,15 @@

Conclusion

That's it. That's all there is to turtle. You now know it. It is good to get used to reading bits of turtle - as though it was English. Yu can now use it in code snippits in chats + as though it was English. You can now use it in code snippets in chats and in code for things like forms, configuration parameters, and so on.


Extensions in rdflib

There a few things which you should not use in data shared - generally, but are shortcts for test data and quick scripts. - rdflib.js will understand these sytatax but never generate them + generally, but which are shortcuts for test data and quick scripts. + rdflib.js will understand these syntaxes but will never generate them.

Naked Dates

@@ -331,7 +331,7 @@

Reverse properties

:alice fam:child :charlie, :davie, :ellie .

This makes the graph of relationships easier to query. - In this example, you can infact express all the information about Alice at once: + In this example, you can in fact express all the information about Alice at once:

   :alice  is fam:child of :grampa, :gramma;