clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [5/7] clerezza git commit: CLEREZZA-988: returning Unparsed instead of a parse XML-Sequence
Date Sat, 18 Apr 2015 09:48:57 GMT
CLEREZZA-988: returning Unparsed instead of a parse XML-Sequence


Project: http://git-wip-us.apache.org/repos/asf/clerezza/repo
Commit: http://git-wip-us.apache.org/repos/asf/clerezza/commit/bd2519d6
Tree: http://git-wip-us.apache.org/repos/asf/clerezza/tree/bd2519d6
Diff: http://git-wip-us.apache.org/repos/asf/clerezza/diff/bd2519d6

Branch: refs/heads/master
Commit: bd2519d672205bb8ca68cc1f236557df3e027f4a
Parents: 51eade1
Author: Reto Gmuer <reto@apache.org>
Authored: Sat Apr 18 09:35:58 2015 +0000
Committer: Reto Gmuer <reto@apache.org>
Committed: Sat Apr 18 09:48:38 2015 +0000

----------------------------------------------------------------------
 .../clerezza/platform/typerendering/scala/XmlResult.scala | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/clerezza/blob/bd2519d6/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
----------------------------------------------------------------------
diff --git a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
index c291bdf..0ac21a0 100644
--- a/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
+++ b/platform/typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
@@ -73,12 +73,9 @@ abstract class XmlResult(arguments: XmlResult.Arguments) {
   }
 
   def render(resource: GraphNode, mode: String) = {
-    def parseNodeSeq(string: String) = {
-      _root_.scala.xml.XML.loadString("<elem>" + string + "</elem>").child
-    }
     val baos = new java.io.ByteArrayOutputStream
     renderer.render(resource, context, mode, baos)
-    parseNodeSeq(new String(baos.toByteArray, UTF8))
+    Unparsed(new String(baos.toByteArray, UTF8))
   }
 
   /**
@@ -97,12 +94,9 @@ abstract class XmlResult(arguments: XmlResult.Arguments) {
    * rendered by the caller but getting a new context using the GraphNodeProvider
    */
   def render(resource: IRI, mode: String) = {
-    def parseNodeSeq(string: String) = {
-      _root_.scala.xml.XML.loadString("<elem>" + string + "</elem>").child
-    }
     val baos = new java.io.ByteArrayOutputStream
     renderer.render(resource, context, mode, baos)
-    parseNodeSeq(new String(baos.toByteArray, UTF8))
+    Unparsed(new String(baos.toByteArray, UTF8))
   }
 
   /**


Mime
View raw message