Add literal example
authorGavin Carothers <gavin@carothers.name>
Wed, 26 Jun 2013 16:29:11 -0700
changeset 868 f6dc98a27baf
parent 867 479f5906ea49
child 869 40f4e26caecc
Add literal example

* Does sort of make the page far too wide. Lovely thing about line orieanted formats huh?
rdf-turtle/n-triples.html
--- a/rdf-turtle/n-triples.html	Wed Jun 26 16:08:47 2013 -0700
+++ b/rdf-turtle/n-triples.html	Wed Jun 26 16:29:11 2013 -0700
@@ -166,9 +166,15 @@
           If present, the <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-language-tagged-string">language tag</a> is preceded by a '<code>@</code>' (<span class="codepoint">U+0040</span>).
           If there is no language tag, there may be a <a href="http://www.w3.org/TR/rdf11-concepts/#dfn-datatype-iri">datatype IRI</a>, preceeded by '<code>^^</code>' (<span class="codepoint">U+005E</span> <span class="codepoint">U+005E</span>). If there is no datatype IRI and no language tag, the datatype is <code>xsd:string</code>.
         </p>
-        <p class="issue">
-          Include examples with a few escapes for new lines, etc
-        </p>
+        <pre class="example"><script type="application/n-triples"><http://example.org/show/218> <http://www.w3.org/2000/01/rdf-schema#label> "That Seventies Show"^^<http://www.w3.org/2001/XMLSchema#string> . # literal with XML Schema string datatype
+<http://example.org/show/218> <http://www.w3.org/2000/01/rdf-schema#label> "That Seventies Show" . # same as above
+<http://example.org/show/218> <http://example.org/show/localName> "That Seventies Show"@en . # literal with a language tag
+<http://example.org/show/218> <http://example.org/show/localName> "Cette Série des Années Septante"@fr-be .  # literal outside of ASCII range with a region subtag 
+<http://example.org/#spiderman> <http://example.org/text> "This is a multi-line\nliteral with many quotes (\"\"\"\"\")\nand two apostrophes ('')." .
+<http://en.wikipedia.org/wiki/Helium> <http://example.org/elements/atomicNumber> "2"^^<http://www.w3.org/2001/XMLSchema#integer> . # xsd:integer     
+<http://en.wikipedia.org/wiki/Helium> <http://example.org/elements/specificGravity> "1.663E-4"^^<http://www.w3.org/2001/XMLSchema#double> .     # xsd:double                                                                      
+</script>
+        </pre>
         </section>
       <section id="BNodes">
         <h3>RDF Blank Nodes</h3>