Nicolae Brinza has proposed merging lp:~nbrinza/zorba/parse-fragment into lp:zorba.
Requested reviews: Nicolae Brinza (nbrinza) Matthias Brantner (matthias-brantner) For more details, see: https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/106000 Documentation improvements. Fixed the type of the options parameter to the parse-fragment() function. -- https://code.launchpad.net/~nbrinza/zorba/parse-fragment/+merge/106000 Your team Zorba Coders is subscribed to branch lp:zorba.
=== 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 @@ : entities</a>). The functions takes two arguments: the first one is the : string to be parsed and the second argument is an <options/> element that : passes a list of options to the parsing function. They are described below. - : The options element must conform to the xml-options.xsd schema. Some of these + : The options element must conform to the xml-options:options element type + : from the xml-options.xsd schema. Some of these : will be passed to the underlying library (LibXml2) and further documentation : for them can be found at <a href="http://xmlsoft.org/html/libxml-parser.html"> : LibXml2 parser</a>. @@ -224,7 +225,7 @@ :) declare function parse-xml:parse( $xml-string as xs:string?, - $options as element()?) as node()* external; + $options as element(parse-xml-options:options)?) as node()* external; (:~ === 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 @@ func_reflection.cpp func_apply.cpp func_serialize_impl.cpp + func_parse_fragment_impl.cpp ) IF (NOT ZORBA_NO_FULL_TEXT) === 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 @@ +/* + * Copyright 2006-2008 The FLWOR Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "stdafx.h" + +#include "common/shared_types.h" +#include "types/typeops.h" + +#include "functions/function.h" +#include "functions/function_impl.h" + +#include "functions/func_parse_fragment.h" + +#include "system/globalenv.h" + +#include "compiler/expression/expr_consts.h" + + +namespace zorba +{ + + +/******************************************************************************* + +********************************************************************************/ +void populate_context_parse_fragment_impl(static_context* sctx) +{ + xqtref_t lParseOptType = + GENV_TYPESYSTEM.create_node_type( + store::StoreConsts::elementNode, + createQName("http://www.zorba-xquery.com/modules/xml-options","","options"), + NULL, + TypeConstants::QUANT_QUESTION, + false, + false + ); + + { + DECL_WITH_KIND(sctx, fn_zorba_xml_parse, + (createQName("http://www.zorba-xquery.com/modules/xml","","parse"), + GENV_TYPESYSTEM.STRING_TYPE_QUESTION, + lParseOptType, + GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), + FunctionConsts::FN_ZORBA_XML_PARSE_2); + } +} + +} + +/* vim:set et sw=2 ts=2: */ === 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 @@ +/* + * Copyright 2006-2012 The FLWOR Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once +#ifndef ZORBA_FUNCTIONS_PARSE_FRAGMENT_IMPL_H +#define ZORBA_FUNCTIONS_PARSE_FRAGMENT_IMPL_H + + +#include "common/shared_types.h" +#include "functions/function.h" +#include "functions/function_impl.h" +#include "functions/function_consts.h" + + +namespace zorba { + + +void populate_context_parse_fragment_impl(static_context* sctx); + + +} //namespace zorba + + +#endif +/* vim:set et sw=2 ts=2: */ + === 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 @@ #include "functions/func_numerics_impl.h" #include "functions/func_parsing_and_serializing.h" #include "functions/func_parse_fragment.h" +#include "functions/func_parse_fragment_impl.h" #include "functions/func_qnames.h" #include "functions/func_random.h" #include "functions/func_schema.h" @@ -122,6 +123,7 @@ populate_context_other_diagnostics(sctx); populate_context_parsing_and_serializing(sctx); populate_context_parse_fragment(sctx); + populate_context_parse_fragment_impl(sctx); populate_context_qnames(sctx); populate_context_random(sctx); populate_context_schema(sctx); === 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 @@ } void populate_context_parse_fragment(static_context* sctx) -{ - { - - - DECL_WITH_KIND(sctx, fn_zorba_xml_parse, - (createQName("http://www.zorba-xquery.com/modules/xml","","parse"), - GENV_TYPESYSTEM.STRING_TYPE_QUESTION, - GENV_TYPESYSTEM.ELEMENT_TYPE_QUESTION, - GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR), - FunctionConsts::FN_ZORBA_XML_PARSE_2); - - } - -} +{} } === 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 @@ <zorba:description author="Zorba Team">fn-zorba-xml:parse</zorba:description> - <zorba:function> + <zorba:function generateDECL="false"> <zorba:signature localname="parse" prefix="fn-zorba-xml"> <zorba:param>xs:string?</zorba:param> <!-- string to parse --> <zorba:param>element()?</zorba:param> <!-- parse() options -->
-- Mailing list: https://launchpad.net/~zorba-coders Post to : [email protected] Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp

