Adding line numbers to all examples
authorYves Raimond <yves.raimond@bbc.co.uk>
Fri, 29 Nov 2013 15:38:15 +0000
changeset 1424 ff60504714f7
parent 1423 bd81b8cc0a7c
child 1425 5b4a12c859bf
Adding line numbers to all examples
rdf-primer/index.html
--- a/rdf-primer/index.html	Fri Nov 29 15:30:42 2013 +0000
+++ b/rdf-primer/index.html	Fri Nov 29 15:38:15 2013 +0000
@@ -992,26 +992,26 @@
       <p>Single-graph example:</p>
 
       <pre class="example" id="rdfa-example">
-&lt;div prefix="
-  rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
-  foaf: http://xmlns.com/foaf/0.1/
-  wd: http://www.wikidata.org/entity/
-  dcterms: http://purl.org/dc/terms/
-  xsd: http://www.w3.org/2001/XMLSchema#"&gt;
-    &lt;div typeof="foaf:Person" about="http://example.org/bob#me"&gt;
-      &lt;p&gt;
-        Bob knows &lt;a rel="foaf:knows" href="http://example.org/alice#me"&gt;Alice&lt;/a&gt;
-        and was born on the &lt;span property="schema:birthDate" datatype="xsd:date"&gt;1990-07-04&lt;/span&gt;.
-      &lt;/p&gt;
-      &lt;p&gt;
-        Bob is interested in &lt;a rel="foaf:topic_interest" resource="wd:Q12418"&gt;the Mona Lisa&lt;/a&gt;.
-      &lt;/p&gt;
-      &lt;div about="wd:Q12418"&gt;
-        The Mona Lisa was painted by &lt;a rel="dcterms:creator" typeof="foaf:Person" href="http://dbpedia.org/resource/Leonardo_da_Vinci"&gt;&lt;span property="foaf:name"&gt;Leonardo da Vinci&lt;/span&gt;&lt;/a&gt;
-        and is the subject of the video &lt;a rev="dcterms:subject" href="http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619"&gt;'La Joconde à Washington'&lt;/a&gt;.
-      &lt;/div&gt;
-  &lt;/div&gt;
-&lt;/div&gt;
+01    &lt;div prefix="
+02      rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
+03      foaf: http://xmlns.com/foaf/0.1/
+04      wd: http://www.wikidata.org/entity/
+05      dcterms: http://purl.org/dc/terms/
+06      xsd: http://www.w3.org/2001/XMLSchema#"&gt;
+07        &lt;div typeof="foaf:Person" about="http://example.org/bob#me"&gt;
+08          &lt;p&gt;
+09            Bob knows &lt;a rel="foaf:knows" href="http://example.org/alice#me"&gt;Alice&lt;/a&gt;
+10            and was born on the &lt;span property="schema:birthDate" datatype="xsd:date"&gt;1990-07-04&lt;/span&gt;.
+11          &lt;/p&gt;
+12          &lt;p&gt;
+13            Bob is interested in &lt;a rel="foaf:topic_interest" resource="wd:Q12418"&gt;the Mona Lisa&lt;/a&gt;.
+14          &lt;/p&gt;
+15          &lt;div about="wd:Q12418"&gt;
+16            The Mona Lisa was painted by &lt;a rel="dcterms:creator" typeof="foaf:Person" href="http://dbpedia.org/resource/Leonardo_da_Vinci"&gt;&lt;span property="foaf:name"&gt;Leonardo da Vinci&lt;/span&gt;&lt;/a&gt;
+17            and is the subject of the video &lt;a rev="dcterms:subject" href="http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619"&gt;'La Joconde à Washington'&lt;/a&gt;.
+18          &lt;/div&gt;
+19      &lt;/div&gt;
+20    &lt;/div&gt;
       </pre>
 
     </section>
@@ -1023,93 +1023,93 @@
       Single-graph example:
 
       <pre class="example" id="json-ld-example-signle">
-{
-  "@context": {
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "schema": "http://schema.org/",
-    "dcterms": "http://purl.org/dc/terms/",
-    "wd": "http://www.wikidata.org/entity/",
-    "@base": "http://example.org/",
-    "subject_of": {"@reverse": "dcterms:subject"}
-  },
-  "@id": "bob#me",
-  "@type": "foaf:Person",
-  "schema:birthDate": {
-    "@value": "1990-07-04",
-    "@type": "xsd:date"
-  },
-  "foaf:knows": {
-    "@id": "alice#me"
-  },
-  "foaf:topic_interest": {
-    "@id": "wd:Q12418",
-    "subject_of": {
-        "@id": "http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619"
-    },
-    "dcterms:creator": {
-      "@id": "http://dbpedia.org/resource/Leonardo_da_Vinci",
-      "@type": "foaf:Person",
-      "foaf:name": "Leonardo da Vinci"
-    }
-  }
-}
+01    {
+02      "@context": {
+03        "foaf": "http://xmlns.com/foaf/0.1/",
+04        "xsd": "http://www.w3.org/2001/XMLSchema#",
+05        "schema": "http://schema.org/",
+06        "dcterms": "http://purl.org/dc/terms/",
+07        "wd": "http://www.wikidata.org/entity/",
+08        "@base": "http://example.org/",
+09        "subject_of": {"@reverse": "dcterms:subject"}
+10      },
+11      "@id": "bob#me",
+12      "@type": "foaf:Person",
+13      "schema:birthDate": {
+14        "@value": "1990-07-04",
+15        "@type": "xsd:date"
+16      },
+17      "foaf:knows": {
+18        "@id": "alice#me"
+19      },
+20      "foaf:topic_interest": {
+21        "@id": "wd:Q12418",
+22        "subject_of": {
+23            "@id": "http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619"
+24        },
+25        "dcterms:creator": {
+26          "@id": "http://dbpedia.org/resource/Leonardo_da_Vinci",
+27          "@type": "foaf:Person",
+28          "foaf:name": "Leonardo da Vinci"
+29        }
+30      }
+31    }
       </pre>
 
      <p>Multiple-graphs example:</p>
 
       <pre class="example" id="json-ld-example-multiple">
-{
-  "@context": {
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "schema": "http://schema.org/",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dcterms": "http://purl.org/dc/terms/"
-  },
-  "@graph": [
-    {
-      "@id": "http://example.org/bob",
-      "@graph": [
-        {
-          "@id": "http://example.org/bob#me",
-          "@type": "foaf:Person",
-          "foaf:knows": {
-            "@id": "http://example.org/alice#me"
-          },
-          "foaf:topic_interest": {
-            "@id": "http://www.wikidata.org/entity/Q12418"
-          },
-          "schema:birthDate": {
-            "@value": "1990-07-04",
-            "@type": "xsd:date"
-          }
-        }
-      ],
-      "dcterms:publisher": {
-        "@id": "http://example.org"
-      },
-      "dcterms:rights": {
-        "@id": "http://creativecommons.org/licenses/by/3.0/"
-      }
-    },
-    {
-      "@id": "https://www.wikidata.org/wiki/Special:EntityData/Q12418",
-      "@graph": [
-        {
-          "@id": "http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619",
-          "dcterms:subject": {
-            "@id": "http://www.wikidata.org/entity/Q12418",
-            "dcterms:creator": {
-              "@id": "http://dbpedia.org/resource/Leonardo_da_Vinci",
-              "@type": "foaf:Person",
-              "foaf:name": "Leonardo da Vinci"
-            }
-          }
-        }
-      ]
-    }
-  ]
-}
+01    {
+02      "@context": {
+03        "foaf": "http://xmlns.com/foaf/0.1/",
+04        "schema": "http://schema.org/",
+05        "xsd": "http://www.w3.org/2001/XMLSchema#",
+06        "dcterms": "http://purl.org/dc/terms/"
+07      },
+08      "@graph": [
+09        {
+10          "@id": "http://example.org/bob",
+11          "@graph": [
+12            {
+13              "@id": "http://example.org/bob#me",
+14              "@type": "foaf:Person",
+15              "foaf:knows": {
+16                "@id": "http://example.org/alice#me"
+17              },
+18              "foaf:topic_interest": {
+19                "@id": "http://www.wikidata.org/entity/Q12418"
+20              },
+21              "schema:birthDate": {
+22                "@value": "1990-07-04",
+23                "@type": "xsd:date"
+24              }
+25            }
+26          ],
+27          "dcterms:publisher": {
+28            "@id": "http://example.org"
+29          },
+30          "dcterms:rights": {
+31            "@id": "http://creativecommons.org/licenses/by/3.0/"
+32          }
+33        },
+34        {
+35          "@id": "https://www.wikidata.org/wiki/Special:EntityData/Q12418",
+36          "@graph": [
+37            {
+38              "@id": "http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619",
+39              "dcterms:subject": {
+40                "@id": "http://www.wikidata.org/entity/Q12418",
+41                "dcterms:creator": {
+42                  "@id": "http://dbpedia.org/resource/Leonardo_da_Vinci",
+43                  "@type": "foaf:Person",
+44                  "foaf:name": "Leonardo da Vinci"
+45                }
+46              }
+47            }
+48          ]
+49        }
+50      ]
+51    }
       </pre>
 
     </section>
@@ -1122,14 +1122,14 @@
       <p>Single-graph example: </p>
 
       <pre class="example" id="n-triples-example">
-&lt;http://example.org/bob#me&gt; &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;http://xmlns.com/foaf/0.1/Person&gt;.
-&lt;http://example.org/bob#me&gt; &lt;http://xmlns.com/foaf/0.1/knows&gt; &lt;http://example.org/alice#me&gt;.
-&lt;http://example.org/bob#me&gt; &lt;http://schema.org/birthDate&gt; "1990-07-04"^^&lt;http://www.w3.org/2001/XMLSchema#date&gt;.
-&lt;http://example.org/bob#me&gt; &lt;http://xmlns.com/foaf/0.1/topic_interest&gt; &lt;http://www.wikidata.org/entity/Q12418&gt;.
-&lt;http://dbpedia.org/resource/Leonardo_da_Vinci&gt; &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;http://xmlns.com/foaf/0.1/Person&gt;.
-&lt;http://dbpedia.org/resource/Leonardo_da_Vinci&gt; &lt;http://xmlns.com/foaf/0.1/name&gt; "Leonardo da Vinci".
-&lt;http://www.wikidata.org/entity/Q12418&gt; &lt;http://purl.org/dc/terms/creator&gt; &lt;http://dbpedia.org/resource/Leonardo_da_Vinci&gt;.
-&lt;http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619&gt; &lt;http://purl.org/dc/terms/subject&gt; &lt;http://www.wikidata.org/entity/Q12418&gt;.
+01    &lt;http://example.org/bob#me&gt; &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;http://xmlns.com/foaf/0.1/Person&gt;.
+02    &lt;http://example.org/bob#me&gt; &lt;http://xmlns.com/foaf/0.1/knows&gt; &lt;http://example.org/alice#me&gt;.
+03    &lt;http://example.org/bob#me&gt; &lt;http://schema.org/birthDate&gt; "1990-07-04"^^&lt;http://www.w3.org/2001/XMLSchema#date&gt;.
+04    &lt;http://example.org/bob#me&gt; &lt;http://xmlns.com/foaf/0.1/topic_interest&gt; &lt;http://www.wikidata.org/entity/Q12418&gt;.
+05    &lt;http://dbpedia.org/resource/Leonardo_da_Vinci&gt; &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;http://xmlns.com/foaf/0.1/Person&gt;.
+06    &lt;http://dbpedia.org/resource/Leonardo_da_Vinci&gt; &lt;http://xmlns.com/foaf/0.1/name&gt; "Leonardo da Vinci".
+07    &lt;http://www.wikidata.org/entity/Q12418&gt; &lt;http://purl.org/dc/terms/creator&gt; &lt;http://dbpedia.org/resource/Leonardo_da_Vinci&gt;.
+08    &lt;http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619&gt; &lt;http://purl.org/dc/terms/subject&gt; &lt;http://www.wikidata.org/entity/Q12418&gt;.
       </pre>
 
      </section>
@@ -1141,16 +1141,16 @@
 <p>Multiple-graph example:</p>
 
       <pre class="example" id="n-quads-example">
-&lt;http://example.org/bob#me&gt; &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;http://xmlns.com/foaf/0.1/Person&gt; &lt;http://example.org/bob&gt; .
-&lt;http://example.org/bob#me&gt; &lt;http://xmlns.com/foaf/0.1/knows&gt; &lt;http://example.org/alice#me&gt; &lt;http://example.org/bob&gt; .
-&lt;http://example.org/bob#me&gt; &lt;http://schema.org/birthDate&gt; "1990-07-04"^^&lt;http://www.w3.org/2001/XMLSchema#date&gt; &lt;http://example.org/bob&gt; .
-&lt;http://example.org/bob#me&gt; &lt;http://xmlns.com/foaf/0.1/topic_interest&gt; &lt;http://www.wikidata.org/entity/Q12418&gt; &lt;http://example.org/bob&gt; .
-&lt;http://dbpedia.org/resource/Leonardo_da_Vinci&gt; &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;http://xmlns.com/foaf/0.1/Person&gt; &lt;https://www.wikidata.org/wiki/Special:EntityData/Q12418&gt; .
-&lt;http://dbpedia.org/resource/Leonardo_da_Vinci&gt; &lt;http://xmlns.com/foaf/0.1/name&gt; "Leonardo da Vinci" &lt;https://www.wikidata.org/wiki/Special:EntityData/Q12418&gt; .
-&lt;http://www.wikidata.org/entity/Q12418&gt; &lt;http://purl.org/dc/terms/creator&gt; &lt;http://dbpedia.org/resource/Leonardo_da_Vinci&gt; &lt;https://www.wikidata.org/wiki/Special:EntityData/Q12418&gt; .
-&lt;http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619&gt; &lt;http://purl.org/dc/terms/subject&gt; &lt;http://www.wikidata.org/entity/Q12418&gt; &lt;https://www.wikidata.org/wiki/Special:EntityData/Q12418&gt; .
-&lt;http://example.org/bob&gt; &lt;http://purl.org/dc/terms/publisher&gt; &lt;http://example.org&gt; .
-&lt;http://example.org/bob&gt; &lt;http://purl.org/dc/terms/rights&gt; &lt;http://creativecommons.org/licenses/by/3.0/&gt; .
+01    &lt;http://example.org/bob#me&gt; &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;http://xmlns.com/foaf/0.1/Person&gt; &lt;http://example.org/bob&gt; .
+02    &lt;http://example.org/bob#me&gt; &lt;http://xmlns.com/foaf/0.1/knows&gt; &lt;http://example.org/alice#me&gt; &lt;http://example.org/bob&gt; .
+03    &lt;http://example.org/bob#me&gt; &lt;http://schema.org/birthDate&gt; "1990-07-04"^^&lt;http://www.w3.org/2001/XMLSchema#date&gt; &lt;http://example.org/bob&gt; .
+04    &lt;http://example.org/bob#me&gt; &lt;http://xmlns.com/foaf/0.1/topic_interest&gt; &lt;http://www.wikidata.org/entity/Q12418&gt; &lt;http://example.org/bob&gt; .
+05    &lt;http://dbpedia.org/resource/Leonardo_da_Vinci&gt; &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;http://xmlns.com/foaf/0.1/Person&gt; &lt;https://www.wikidata.org/wiki/Special:EntityData/Q12418&gt; .
+06    &lt;http://dbpedia.org/resource/Leonardo_da_Vinci&gt; &lt;http://xmlns.com/foaf/0.1/name&gt; "Leonardo da Vinci" &lt;https://www.wikidata.org/wiki/Special:EntityData/Q12418&gt; .
+07    &lt;http://www.wikidata.org/entity/Q12418&gt; &lt;http://purl.org/dc/terms/creator&gt; &lt;http://dbpedia.org/resource/Leonardo_da_Vinci&gt; &lt;https://www.wikidata.org/wiki/Special:EntityData/Q12418&gt; .
+08    &lt;http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619&gt; &lt;http://purl.org/dc/terms/subject&gt; &lt;http://www.wikidata.org/entity/Q12418&gt; &lt;https://www.wikidata.org/wiki/Special:EntityData/Q12418&gt; .
+09    &lt;http://example.org/bob&gt; &lt;http://purl.org/dc/terms/publisher&gt; &lt;http://example.org&gt; .
+10    &lt;http://example.org/bob&gt; &lt;http://purl.org/dc/terms/rights&gt; &lt;http://creativecommons.org/licenses/by/3.0/&gt; .
       </pre>
 
     </section>
@@ -1162,29 +1162,29 @@
     <p>Single-graph example:</p>
 
       <pre class="example" id="rdf-xml-example">
-&lt;?xml version="1.0" encoding="utf-8"?&gt;
-&lt;rdf:RDF
-   xmlns:dcterms="http://purl.org/dc/terms/"
-   xmlns:foaf="http://xmlns.com/foaf/0.1/"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:schema="http://schema.org/"
-   xmlns:wd="http://www.wikidata.org/entity/"
-   xmlns:xsd="http://www.w3.org/2001/XMLSchema#"&gt;
-  &lt;foaf:Person rdf:about="http://example.org/bob#me"&gt;
-    &lt;schema:birthDate rdf:datatype="http://www.w3.org/2001/XMLSchema#date"&gt;1990-07-04&lt;/schema:birthDate&gt;
-    &lt;foaf:knows rdf:resource="http://example.org/alice#me"/&gt;
-    &lt;foaf:topic_interest rdf:resource="http://www.wikidata.org/entity/Q12418"/&gt;
-  &lt;/foaf:Person&gt;
-  &lt;foaf:Person rdf:about="http://dbpedia.org/resource/Leonardo_da_Vinci"&gt;
-    &lt;foaf:name&gt;Leonardo da Vinci&lt;/foaf:name&gt;
-  &lt;/foaf:Person&gt;
-  &lt;rdf:Description rdf:about="http://www.wikidata.org/entity/Q12418"&gt;
-    &lt;dcterms:creator rdf:resource="http://dbpedia.org/resource/Leonardo_da_Vinci"/&gt;
-  &lt;/rdf:Description&gt;
-  &lt;rdf:Description rdf:about="http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619"&gt;
-    &lt;dcterms:subject rdf:resource="http://www.wikidata.org/entity/Q12418"/&gt;
-  &lt;/rdf:Description&gt;
-&lt;/rdf:RDF&gt;
+01    &lt;?xml version="1.0" encoding="utf-8"?&gt;
+02    &lt;rdf:RDF
+03       xmlns:dcterms="http://purl.org/dc/terms/"
+04       xmlns:foaf="http://xmlns.com/foaf/0.1/"
+05       xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+06       xmlns:schema="http://schema.org/"
+07       xmlns:wd="http://www.wikidata.org/entity/"
+08       xmlns:xsd="http://www.w3.org/2001/XMLSchema#"&gt;
+09      &lt;foaf:Person rdf:about="http://example.org/bob#me"&gt;
+10        &lt;schema:birthDate rdf:datatype="http://www.w3.org/2001/XMLSchema#date"&gt;1990-07-04&lt;/schema:birthDate&gt;
+11        &lt;foaf:knows rdf:resource="http://example.org/alice#me"/&gt;
+12        &lt;foaf:topic_interest rdf:resource="http://www.wikidata.org/entity/Q12418"/&gt;
+13      &lt;/foaf:Person&gt;
+14      &lt;foaf:Person rdf:about="http://dbpedia.org/resource/Leonardo_da_Vinci"&gt;
+15        &lt;foaf:name&gt;Leonardo da Vinci&lt;/foaf:name&gt;
+16      &lt;/foaf:Person&gt;
+17      &lt;rdf:Description rdf:about="http://www.wikidata.org/entity/Q12418"&gt;
+18        &lt;dcterms:creator rdf:resource="http://dbpedia.org/resource/Leonardo_da_Vinci"/&gt;
+19      &lt;/rdf:Description&gt;
+20      &lt;rdf:Description rdf:about="http://data.europeana.eu/item/04802/243FA8618938F4117025F17A8B813C5F9AA4D619"&gt;
+21        &lt;dcterms:subject rdf:resource="http://www.wikidata.org/entity/Q12418"/&gt;
+22      &lt;/rdf:Description&gt;
+23    &lt;/rdf:RDF&gt;
       </pre>
 
 </section>