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

Proposed by Nicolae Brinza
Status: Merged
Approved by: Nicolae Brinza
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
Matthias Brantner Approve
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.
Revision history for this message
Nicolae Brinza (nbrinza) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
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

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
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!

Revision history for this message
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.

Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Nicolae Brinza (nbrinza) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
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
=== modified file 'modules/com/zorba-xquery/www/modules/xml.xq'
--- modules/com/zorba-xquery/www/modules/xml.xq 2012-05-11 14:02:25 +0000
+++ modules/com/zorba-xquery/www/modules/xml.xq 2012-05-16 15:24:22 +0000
@@ -85,7 +85,8 @@
85 : entities</a>). The functions takes two arguments: the first one is the 85 : entities</a>). The functions takes two arguments: the first one is the
86 : string to be parsed and the second argument is an &lt;options/&gt; element that86 : string to be parsed and the second argument is an &lt;options/&gt; element that
87 : passes a list of options to the parsing function. They are described below.87 : passes a list of options to the parsing function. They are described below.
88 : The options element must conform to the xml-options.xsd schema. Some of these88 : The options element must conform to the xml-options:options element type
89 : from the xml-options.xsd schema. Some of these
89 : will be passed to the underlying library (LibXml2) and further documentation 90 : will be passed to the underlying library (LibXml2) and further documentation
90 : for them can be found at <a href="http://xmlsoft.org/html/libxml-parser.html">91 : for them can be found at <a href="http://xmlsoft.org/html/libxml-parser.html">
91 : LibXml2 parser</a>.92 : LibXml2 parser</a>.
@@ -224,7 +225,7 @@
224 :)225 :)
225declare function parse-xml:parse(226declare function parse-xml:parse(
226 $xml-string as xs:string?,227 $xml-string as xs:string?,
227 $options as element()?) as node()* external;228 $options as element(parse-xml-options:options)?) as node()* external;
228 229
229230
230(:~231(:~
231232
=== modified file 'src/functions/CMakeLists.txt'
--- src/functions/CMakeLists.txt 2012-05-03 12:31:51 +0000
+++ src/functions/CMakeLists.txt 2012-05-16 15:24:22 +0000
@@ -82,6 +82,7 @@
82 func_reflection.cpp82 func_reflection.cpp
83 func_apply.cpp83 func_apply.cpp
84 func_serialize_impl.cpp84 func_serialize_impl.cpp
85 func_parse_fragment_impl.cpp
85)86)
8687
87IF (NOT ZORBA_NO_FULL_TEXT)88IF (NOT ZORBA_NO_FULL_TEXT)
8889
=== added file 'src/functions/func_parse_fragment_impl.cpp'
--- src/functions/func_parse_fragment_impl.cpp 1970-01-01 00:00:00 +0000
+++ src/functions/func_parse_fragment_impl.cpp 2012-05-16 15:24:22 +0000
@@ -0,0 +1,62 @@
1/*
2 * Copyright 2006-2008 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#include "stdafx.h"
17
18#include "common/shared_types.h"
19#include "types/typeops.h"
20
21#include "functions/function.h"
22#include "functions/function_impl.h"
23
24#include "functions/func_parse_fragment.h"
25
26#include "system/globalenv.h"
27
28#include "compiler/expression/expr_consts.h"
29
30
31namespace zorba
32{
33
34
35/*******************************************************************************
36
37********************************************************************************/
38void populate_context_parse_fragment_impl(static_context* sctx)
39{
40 xqtref_t lParseOptType =
41 GENV_TYPESYSTEM.create_node_type(
42 store::StoreConsts::elementNode,
43 createQName("http://www.zorba-xquery.com/modules/xml-options","","options"),
44 NULL,
45 TypeConstants::QUANT_QUESTION,
46 false,
47 false
48 );
49
50 {
51 DECL_WITH_KIND(sctx, fn_zorba_xml_parse,
52 (createQName("http://www.zorba-xquery.com/modules/xml","","parse"),
53 GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
54 lParseOptType,
55 GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR),
56 FunctionConsts::FN_ZORBA_XML_PARSE_2);
57 }
58}
59
60}
61
62/* vim:set et sw=2 ts=2: */
063
=== added file 'src/functions/func_parse_fragment_impl.h'
--- src/functions/func_parse_fragment_impl.h 1970-01-01 00:00:00 +0000
+++ src/functions/func_parse_fragment_impl.h 2012-05-16 15:24:22 +0000
@@ -0,0 +1,38 @@
1/*
2 * Copyright 2006-2012 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#pragma once
17#ifndef ZORBA_FUNCTIONS_PARSE_FRAGMENT_IMPL_H
18#define ZORBA_FUNCTIONS_PARSE_FRAGMENT_IMPL_H
19
20
21#include "common/shared_types.h"
22#include "functions/function.h"
23#include "functions/function_impl.h"
24#include "functions/function_consts.h"
25
26
27namespace zorba {
28
29
30void populate_context_parse_fragment_impl(static_context* sctx);
31
32
33} //namespace zorba
34
35
36#endif
37/* vim:set et sw=2 ts=2: */
38
039
=== modified file 'src/functions/func_reflection.cpp' (properties changed: +x to -x)
=== modified file 'src/functions/func_reflection.h' (properties changed: +x to -x)
=== modified file 'src/functions/library.cpp'
--- src/functions/library.cpp 2012-05-03 12:31:51 +0000
+++ src/functions/library.cpp 2012-05-16 15:24:22 +0000
@@ -50,6 +50,7 @@
50#include "functions/func_numerics_impl.h"50#include "functions/func_numerics_impl.h"
51#include "functions/func_parsing_and_serializing.h"51#include "functions/func_parsing_and_serializing.h"
52#include "functions/func_parse_fragment.h"52#include "functions/func_parse_fragment.h"
53#include "functions/func_parse_fragment_impl.h"
53#include "functions/func_qnames.h"54#include "functions/func_qnames.h"
54#include "functions/func_random.h"55#include "functions/func_random.h"
55#include "functions/func_schema.h"56#include "functions/func_schema.h"
@@ -122,6 +123,7 @@
122 populate_context_other_diagnostics(sctx);123 populate_context_other_diagnostics(sctx);
123 populate_context_parsing_and_serializing(sctx);124 populate_context_parsing_and_serializing(sctx);
124 populate_context_parse_fragment(sctx);125 populate_context_parse_fragment(sctx);
126 populate_context_parse_fragment_impl(sctx);
125 populate_context_qnames(sctx);127 populate_context_qnames(sctx);
126 populate_context_random(sctx);128 populate_context_random(sctx);
127 populate_context_schema(sctx);129 populate_context_schema(sctx);
128130
=== modified file 'src/functions/pregenerated/func_parse_fragment.cpp' (properties changed: +x to -x)
--- src/functions/pregenerated/func_parse_fragment.cpp 2012-05-03 12:31:51 +0000
+++ src/functions/pregenerated/func_parse_fragment.cpp 2012-05-16 15:24:22 +0000
@@ -42,20 +42,7 @@
42}42}
4343
44void populate_context_parse_fragment(static_context* sctx)44void populate_context_parse_fragment(static_context* sctx)
45{45{}
46 {
47
48
49 DECL_WITH_KIND(sctx, fn_zorba_xml_parse,
50 (createQName("http://www.zorba-xquery.com/modules/xml","","parse"),
51 GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
52 GENV_TYPESYSTEM.ELEMENT_TYPE_QUESTION,
53 GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR),
54 FunctionConsts::FN_ZORBA_XML_PARSE_2);
55
56 }
57
58}
5946
6047
61}48}
6249
=== modified file 'src/functions/pregenerated/func_parse_fragment.h' (properties changed: +x to -x)
=== modified file 'src/runtime/spec/parsing_and_serializing/parse_fragment.xml' (properties changed: +x to -x)
--- src/runtime/spec/parsing_and_serializing/parse_fragment.xml 2012-05-03 12:31:51 +0000
+++ src/runtime/spec/parsing_and_serializing/parse_fragment.xml 2012-05-16 15:24:22 +0000
@@ -26,7 +26,7 @@
26 26
27 <zorba:description author="Zorba Team">fn-zorba-xml:parse</zorba:description>27 <zorba:description author="Zorba Team">fn-zorba-xml:parse</zorba:description>
28 28
29 <zorba:function>29 <zorba:function generateDECL="false">
30 <zorba:signature localname="parse" prefix="fn-zorba-xml">30 <zorba:signature localname="parse" prefix="fn-zorba-xml">
31 <zorba:param>xs:string?</zorba:param> <!-- string to parse -->31 <zorba:param>xs:string?</zorba:param> <!-- string to parse -->
32 <zorba:param>element()?</zorba:param> <!-- parse() options -->32 <zorba:param>element()?</zorba:param> <!-- parse() options -->

Subscribers

People subscribed via source and target branches