--- a/rdf-turtle/index.html Fri Jun 10 14:34:17 2011 -0700
+++ b/rdf-turtle/index.html Fri Jun 10 14:56:46 2011 -0700
@@ -77,6 +77,12 @@
doRDFa: true,
};
</script>
+ <script>
+ function updateExample(doc, content) {
+ // perform transformations to make it render and prettier
+ return '<pre class="example">' + doc._esc(content) + '</pre>';
+ }
+ </script>
</head>
@@ -441,32 +447,13 @@
<p>Example (<a href="tests/test-30.ttl">test-30.ttl</a>) with document base URI
http://www.w3.org/2001/sw/DataAccess/df1/tests/</p>
- <pre class="example">
-# In-scope base URI is http://www.w3.org/2001/sw/DataAccess/df1/tests/ at this point
-<test-00.ttl> <test-01.ttl> <test-02.ttl> .
-@base <http://example.org/ns/> .
-# In-scope base URI is http://example.org/ns/ at this point
-<a2> <http://example.org/ns/b2> <c2> .
-@base <foo/> .
-# In-scope base URI is http://example.org/ns/foo/ at this point
-
-<a3> <b3> <c3> .
-@prefix : <bar#> .
-:a4 :b4 :c4 .
-@prefix : <http://example.org/ns2#> .
-:a5 :b5 :c5 .
+ <pre class="example" data-include="tests/text-30.ttl" data-oninclude="updateExample">
</pre>
<p>encodes the following N-Triples
(<a href="tests/test-30.out">test-30.out</a>):
</p>
- <pre class="example">
-<http://www.w3.org/2001/sw/DataAccess/df1/tests/test-00.ttl> <http://www.w3.org/2001/sw/DataAccess/df1/tests/test-01.ttl> <http://www.w3.org/2001/sw/DataAccess/df1/tests/test-02.ttl> .
-<http://example.org/ns/a2> <http://example.org/ns/b2> <http://example.org/ns/c2> .
-<http://example.org/ns/foo/a3> <http://example.org/ns/foo/b3> <http://example.org/ns/foo/c3> .
-
-<http://example.org/ns/foo/bar#a4> <http://example.org/ns/foo/bar#b4> <http://example.org/ns/foo/bar#c4> .
-<http://example.org/ns2#a5> <http://example.org/ns2#b5> <http://example.org/ns2#c5> .
+ <pre class="example" data-include="tests/text-30.out" data-oninclude="updateExample">
</pre>
<p>The Turtle syntax for literals and blank nodes are defined by <a href="http://www.w3.org/TR/rdf-sparql-query/#QSynLiterals">SPARQL Query section 4.1.2</a> and <a href="http://www.w3.org/TR/rdf-sparql-query/#QSynBlankNodes">SPARQL Query section 4.1.4</a> respectively.</p>