Merge lp:~nbrinza/zorba/parse-fragment into lp:zorba

Proposed by Nicolae Brinza on 2012-05-16
Status: Merged
Approved by: Nicolae Brinza on 2012-05-16
Approved revision: 10528
Merged at revision: 10844
Proposed branch: lp:~nbrinza/zorba/parse-fragment
Merge into: lp:zorba
Diff against target: 206 lines (+108/-17)
7 files modified
modules/com/zorba-xquery/www/modules/xml.xq (+3/-2)
src/functions/CMakeLists.txt (+1/-0)
src/functions/func_parse_fragment_impl.cpp (+62/-0)
src/functions/func_parse_fragment_impl.h (+38/-0)
src/functions/library.cpp (+2/-0)
src/functions/pregenerated/func_parse_fragment.cpp (+1/-14)
src/runtime/spec/parsing_and_serializing/parse_fragment.xml (+1/-1)
To merge this branch: bzr merge lp:~nbrinza/zorba/parse-fragment
Reviewer Review Type Date Requested Status
Nicolae Brinza Approve on 2012-05-16
Matthias Brantner 2012-05-16 Approve on 2012-05-16
Review via email: mp+106000@code.launchpad.net

This proposal supersedes a proposal from 2012-05-16.

Commit Message

Documentation improvements. Fixed the type of the options parameter to the parse-fragment() function.

Description of the Change

Documentation improvements. Fixed the type of the options parameter to the parse-fragment() function.

To post a comment you must log in.
Nicolae Brinza (nbrinza) : Posted in a previous version of this proposal
review: Approve
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

The attempt to merge lp:~nbrinza/zorba/parse-fragment into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job parse-fragment-2012-05-16T14-32-13.325Z is finished.
  The final status was:

  1 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job parse-fragment-2012-05-16T15-43-10.152Z is finished. The final status was:

All tests succeeded!

Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 2 Pending.

review: Approve
Nicolae Brinza (nbrinza) :
review: Approve
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job parse-fragment-2012-05-16T18-02-08.699Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/com/zorba-xquery/www/modules/xml.xq'
2--- modules/com/zorba-xquery/www/modules/xml.xq 2012-05-11 14:02:25 +0000
3+++ modules/com/zorba-xquery/www/modules/xml.xq 2012-05-16 15:24:22 +0000
4@@ -85,7 +85,8 @@
5 : entities</a>). The functions takes two arguments: the first one is the
6 : string to be parsed and the second argument is an &lt;options/&gt; element that
7 : passes a list of options to the parsing function. They are described below.
8- : The options element must conform to the xml-options.xsd schema. Some of these
9+ : The options element must conform to the xml-options:options element type
10+ : from the xml-options.xsd schema. Some of these
11 : will be passed to the underlying library (LibXml2) and further documentation
12 : for them can be found at <a href="http://xmlsoft.org/html/libxml-parser.html">
13 : LibXml2 parser</a>.
14@@ -224,7 +225,7 @@
15 :)
16 declare function parse-xml:parse(
17 $xml-string as xs:string?,
18- $options as element()?) as node()* external;
19+ $options as element(parse-xml-options:options)?) as node()* external;
20
21
22 (:~
23
24=== modified file 'src/functions/CMakeLists.txt'
25--- src/functions/CMakeLists.txt 2012-05-03 12:31:51 +0000
26+++ src/functions/CMakeLists.txt 2012-05-16 15:24:22 +0000
27@@ -82,6 +82,7 @@
28 func_reflection.cpp
29 func_apply.cpp
30 func_serialize_impl.cpp
31+ func_parse_fragment_impl.cpp
32 )
33
34 IF (NOT ZORBA_NO_FULL_TEXT)
35
36=== added file 'src/functions/func_parse_fragment_impl.cpp'
37--- src/functions/func_parse_fragment_impl.cpp 1970-01-01 00:00:00 +0000
38+++ src/functions/func_parse_fragment_impl.cpp 2012-05-16 15:24:22 +0000
39@@ -0,0 +1,62 @@
40+/*
41+ * Copyright 2006-2008 The FLWOR Foundation.
42+ *
43+ * Licensed under the Apache License, Version 2.0 (the "License");
44+ * you may not use this file except in compliance with the License.
45+ * You may obtain a copy of the License at
46+ *
47+ * http://www.apache.org/licenses/LICENSE-2.0
48+ *
49+ * Unless required by applicable law or agreed to in writing, software
50+ * distributed under the License is distributed on an "AS IS" BASIS,
51+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
52+ * See the License for the specific language governing permissions and
53+ * limitations under the License.
54+ */
55+#include "stdafx.h"
56+
57+#include "common/shared_types.h"
58+#include "types/typeops.h"
59+
60+#include "functions/function.h"
61+#include "functions/function_impl.h"
62+
63+#include "functions/func_parse_fragment.h"
64+
65+#include "system/globalenv.h"
66+
67+#include "compiler/expression/expr_consts.h"
68+
69+
70+namespace zorba
71+{
72+
73+
74+/*******************************************************************************
75+
76+********************************************************************************/
77+void populate_context_parse_fragment_impl(static_context* sctx)
78+{
79+ xqtref_t lParseOptType =
80+ GENV_TYPESYSTEM.create_node_type(
81+ store::StoreConsts::elementNode,
82+ createQName("http://www.zorba-xquery.com/modules/xml-options","","options"),
83+ NULL,
84+ TypeConstants::QUANT_QUESTION,
85+ false,
86+ false
87+ );
88+
89+ {
90+ DECL_WITH_KIND(sctx, fn_zorba_xml_parse,
91+ (createQName("http://www.zorba-xquery.com/modules/xml","","parse"),
92+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
93+ lParseOptType,
94+ GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR),
95+ FunctionConsts::FN_ZORBA_XML_PARSE_2);
96+ }
97+}
98+
99+}
100+
101+/* vim:set et sw=2 ts=2: */
102
103=== added file 'src/functions/func_parse_fragment_impl.h'
104--- src/functions/func_parse_fragment_impl.h 1970-01-01 00:00:00 +0000
105+++ src/functions/func_parse_fragment_impl.h 2012-05-16 15:24:22 +0000
106@@ -0,0 +1,38 @@
107+/*
108+ * Copyright 2006-2012 The FLWOR Foundation.
109+ *
110+ * Licensed under the Apache License, Version 2.0 (the "License");
111+ * you may not use this file except in compliance with the License.
112+ * You may obtain a copy of the License at
113+ *
114+ * http://www.apache.org/licenses/LICENSE-2.0
115+ *
116+ * Unless required by applicable law or agreed to in writing, software
117+ * distributed under the License is distributed on an "AS IS" BASIS,
118+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
119+ * See the License for the specific language governing permissions and
120+ * limitations under the License.
121+ */
122+#pragma once
123+#ifndef ZORBA_FUNCTIONS_PARSE_FRAGMENT_IMPL_H
124+#define ZORBA_FUNCTIONS_PARSE_FRAGMENT_IMPL_H
125+
126+
127+#include "common/shared_types.h"
128+#include "functions/function.h"
129+#include "functions/function_impl.h"
130+#include "functions/function_consts.h"
131+
132+
133+namespace zorba {
134+
135+
136+void populate_context_parse_fragment_impl(static_context* sctx);
137+
138+
139+} //namespace zorba
140+
141+
142+#endif
143+/* vim:set et sw=2 ts=2: */
144+
145
146=== modified file 'src/functions/func_reflection.cpp' (properties changed: +x to -x)
147=== modified file 'src/functions/func_reflection.h' (properties changed: +x to -x)
148=== modified file 'src/functions/library.cpp'
149--- src/functions/library.cpp 2012-05-03 12:31:51 +0000
150+++ src/functions/library.cpp 2012-05-16 15:24:22 +0000
151@@ -50,6 +50,7 @@
152 #include "functions/func_numerics_impl.h"
153 #include "functions/func_parsing_and_serializing.h"
154 #include "functions/func_parse_fragment.h"
155+#include "functions/func_parse_fragment_impl.h"
156 #include "functions/func_qnames.h"
157 #include "functions/func_random.h"
158 #include "functions/func_schema.h"
159@@ -122,6 +123,7 @@
160 populate_context_other_diagnostics(sctx);
161 populate_context_parsing_and_serializing(sctx);
162 populate_context_parse_fragment(sctx);
163+ populate_context_parse_fragment_impl(sctx);
164 populate_context_qnames(sctx);
165 populate_context_random(sctx);
166 populate_context_schema(sctx);
167
168=== modified file 'src/functions/pregenerated/func_parse_fragment.cpp' (properties changed: +x to -x)
169--- src/functions/pregenerated/func_parse_fragment.cpp 2012-05-03 12:31:51 +0000
170+++ src/functions/pregenerated/func_parse_fragment.cpp 2012-05-16 15:24:22 +0000
171@@ -42,20 +42,7 @@
172 }
173
174 void populate_context_parse_fragment(static_context* sctx)
175-{
176- {
177-
178-
179- DECL_WITH_KIND(sctx, fn_zorba_xml_parse,
180- (createQName("http://www.zorba-xquery.com/modules/xml","","parse"),
181- GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
182- GENV_TYPESYSTEM.ELEMENT_TYPE_QUESTION,
183- GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR),
184- FunctionConsts::FN_ZORBA_XML_PARSE_2);
185-
186- }
187-
188-}
189+{}
190
191
192 }
193
194=== modified file 'src/functions/pregenerated/func_parse_fragment.h' (properties changed: +x to -x)
195=== modified file 'src/runtime/spec/parsing_and_serializing/parse_fragment.xml' (properties changed: +x to -x)
196--- src/runtime/spec/parsing_and_serializing/parse_fragment.xml 2012-05-03 12:31:51 +0000
197+++ src/runtime/spec/parsing_and_serializing/parse_fragment.xml 2012-05-16 15:24:22 +0000
198@@ -26,7 +26,7 @@
199
200 <zorba:description author="Zorba Team">fn-zorba-xml:parse</zorba:description>
201
202- <zorba:function>
203+ <zorba:function generateDECL="false">
204 <zorba:signature localname="parse" prefix="fn-zorba-xml">
205 <zorba:param>xs:string?</zorba:param> <!-- string to parse -->
206 <zorba:param>element()?</zorba:param> <!-- parse() options -->

Subscribers

People subscribed via source and target branches