Rename @literal to @value in turtle serializer/syntax highlighter.
authorDave Longley <dlongley@digitalbazaar.com>
Wed, 11 Jan 2012 21:53:12 -0500
changeset 336 1af76c4b7fe6
parent 335 018a1e6cd654
child 337 d2830bafe684
Rename @literal to @value in turtle serializer/syntax highlighter.
playground/jsonld-turtle.js
playground/lang-jsonld.js
--- a/playground/jsonld-turtle.js	Wed Jan 11 21:51:47 2012 -0500
+++ b/playground/jsonld-turtle.js	Wed Jan 11 21:53:12 2012 -0500
@@ -3,7 +3,7 @@
  *
  * @author Manu Sporny
  *
- * Copyright (c) 2011 Digital Bazaar, Inc. All rights reserved.
+ * Copyright (c) 2011-2012 Digital Bazaar, Inc. All rights reserved.
  */
 (function()
 {
@@ -105,13 +105,13 @@
    else if(obj instanceof Object)
    {
       // the object is an IRI, typed literal or language-tagged literal
-      if("@literal" in obj && "@type" in obj)
+      if("@value" in obj && "@type" in obj)
       {
-         rval = "\"" + obj["@literal"] + "\"^^<" + obj["@type"] + ">";
+         rval = "\"" + obj["@value"] + "\"^^<" + obj["@type"] + ">";
       }
-      else if("@literal" in obj && "@language" in obj)
+      else if("@value" in obj && "@language" in obj)
       {
-         rval = "\"" + obj["@literal"] + "\"@" + obj["@language"];
+         rval = "\"" + obj["@value"] + "\"@" + obj["@language"];
       }
       else if("@id" in obj)
       {
--- a/playground/lang-jsonld.js	Wed Jan 11 21:51:47 2012 -0500
+++ b/playground/lang-jsonld.js	Wed Jan 11 21:53:12 2012 -0500
@@ -55,7 +55,7 @@
     ],
     [
       // common "keywords"
-      ["lang-jsonld-keyword", /^"(@id|@context|@type|@literal|@language)"\s*:/],
+      ["lang-jsonld-keyword", /^"(@id|@context|@type|@value|@language)"\s*:/],
       // empty string
       //[PR.PR_LITERAL, /^""/],
       ["lang-jsonld-string", /^""/],