notes about using strings directly- added cnt eg
authorTim L <lebot@rpi.edu>
Mon, 16 Apr 2012 09:06:15 -0400
changeset 2319 0bc71f2565d5
parent 2318 cc24d04c65eb
child 2320 1a7d883e143e
notes about using strings directly- added cnt eg
bestpractices/BestPractices.html
--- a/bestpractices/BestPractices.html	Mon Apr 16 09:01:46 2012 -0400
+++ b/bestpractices/BestPractices.html	Mon Apr 16 09:06:15 2012 -0400
@@ -1133,6 +1133,28 @@
 
       <a href="http://www.w3.org/TR/Content-in-RDF10/">Content in RDF</a> can be used to model string values while maintaining the datatype/objectproperty distinction and complying with PROV-O.
       Also,  resource can use the rdf:value property to store the string value. We recommend NOT using a blank node, but to derive the URI from the string itself (using a hash) or just a UUID.
+   
+   <pre>
+@prefix cnt: &lt;http://www.w3.org/2008/content#&gt; .
+
+:activity a prov:Activity;
+ prov:used [ # dont' use a blank node!
+ a prov:Entity, cnt:ContentAsText ;
+ cnt:chars "The magic string" ;
+]  .
+
+:activity a prov:Activity;
+ prov:used :theMagicString .
+
+:magicString
+ a prov:Entity, cnt:ContentAsText ;
+ cnt:chars "The magic string" .
+</pre>
+
+
+(there's also cnt:ContentAsBase64 and cnt:bytes for verbose binaries,
+and cnt:ContentAsXML for literal XMLs)
+
    </section>
 
     <section class='appendix'>