Ghislain Fourny has proposed merging lp:~zorba-coders/zorba/fn-serialize-json 
into lp:zorba.

Requested reviews:
  Chris Hillery (ceejatec)
  Matthias Brantner (matthias-brantner)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/fn-serialize-json/+merge/120569

Allowing fn:serialize to also serialize JSON/JSONiq.
-- 
https://code.launchpad.net/~zorba-coders/zorba/fn-serialize-json/+merge/120569
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'schemas/xslt-xquery-serialization.xsd'
--- schemas/xslt-xquery-serialization.xsd	2012-08-16 18:31:02 +0000
+++ schemas/xslt-xquery-serialization.xsd	2012-08-21 13:47:22 +0000
@@ -61,6 +61,8 @@
           <xs:enumeration value="text"/>
           <xs:enumeration value="xml"/>
           <xs:enumeration value="xhtml"/>
+          <xs:enumeration value="json"/>
+          <xs:enumeration value="jsoniq"/>
         </xs:restriction>
       </xs:simpleType>
       <xs:simpleType>
@@ -324,6 +326,24 @@
         type="output:string-param-type"
         substitutionGroup="output:serialization-parameter-element"/>
 
+  <!--
+     - Serialization parameter element for serializing multiple JSON items.
+    -->
+  <xs:element id="jsoniq-multiple-items" name="jsoniq-multiple-items" type="output:string-param-type"
+    substitutionGroup="output:serialization-parameter-element"/>
+  
+  <!--
+     - Serialization parameter element for activating JSONiq extensions.
+    -->
+  <xs:element id="jsoniq-extensions" name="jsoniq-extensions" type="output:yes-no-param-type"
+    substitutionGroup="output:serialization-parameter-element"/>
+  
+  <!--
+     - Serialization parameter element for specifying XML output method inside JSON.
+    -->
+  <xs:element id="jsoniq-xdm-node-output-method" name="jsoniq-xdm-node-output-method" type="output:method-param-type"
+    substitutionGroup="output:serialization-parameter-element"/>
+  
   <xs:element name="serialization-parameters">
     <xs:complexType>
       <xs:sequence>

=== added file 'test/rbkt/ExpQueryResults/zorba/jsoniq/fn-serialize-2.xml.res'
--- test/rbkt/ExpQueryResults/zorba/jsoniq/fn-serialize-2.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/jsoniq/fn-serialize-2.xml.res	2012-08-21 13:47:22 +0000
@@ -0,0 +1,1 @@
+<json>{ "foo" : "bar" }{ "bar" : "blub" }</json>

=== added file 'test/rbkt/ExpQueryResults/zorba/jsoniq/fn-serialize.xml.res'
--- test/rbkt/ExpQueryResults/zorba/jsoniq/fn-serialize.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/jsoniq/fn-serialize.xml.res	2012-08-21 13:47:22 +0000
@@ -0,0 +1,1 @@
+<json>{ "foo" : "bar" }</json>

=== added file 'test/rbkt/Queries/zorba/jsoniq/fn-serialize-2.xq'
--- test/rbkt/Queries/zorba/jsoniq/fn-serialize-2.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/jsoniq/fn-serialize-2.xq	2012-08-21 13:47:22 +0000
@@ -0,0 +1,7 @@
+<json>{
+  fn:serialize(({ "foo" : "bar"}, { "bar" : "blub" }),
+               <output:serialization-parameters xmlns:output="http://www.w3.org/2010/xslt-xquery-serialization";>
+                 <output:method value="json"/>
+                 <output:jsoniq-multiple-items value="appended"/>
+               </output:serialization-parameters>)
+}</json>
\ No newline at end of file

=== added file 'test/rbkt/Queries/zorba/jsoniq/fn-serialize.xq'
--- test/rbkt/Queries/zorba/jsoniq/fn-serialize.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/jsoniq/fn-serialize.xq	2012-08-21 13:47:22 +0000
@@ -0,0 +1,6 @@
+<json>{
+  fn:serialize({ "foo" : "bar"},
+               <output:serialization-parameters xmlns:output="http://www.w3.org/2010/xslt-xquery-serialization";>
+                 <output:method value="json"/>
+               </output:serialization-parameters>)
+}</json>
\ No newline at end of file

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to