Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch
into lp:zorba.
Commit message:
API change - Fixed bug #938574 (changed the names and semantics of the
NsScoping enum)
Requested reviews:
Markos Zaharioudakis (markos-za)
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/172205
API change - Fixed bug #938574 (changed the names and semantics of the
NsScoping enum)
--
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/172205
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog 2013-06-28 03:52:18 +
+++ ChangeLog 2013-06-29 18:40:35 +
@@ -44,6 +44,7 @@
* Fixed bug #1188100 (regex issues with 'q' flag in fn:tokenize)
* Fixed invalid memory access error occuring during sequence type matching
for user-defined types.
+ * API change - Fixed bug #938574 (changed the names and semantics of the NsScoping enum)
* Fixed bug #1190710 (fn-format-date failures)
* Fixed bug #1190407 (wrong rewrite of if-then-else return clause in case
of general flwor)
=== modified file 'doc/cxx/examples/simple.cpp'
--- doc/cxx/examples/simple.cpp 2013-02-07 17:24:36 +
+++ doc/cxx/examples/simple.cpp 2013-06-29 18:40:35 +
@@ -274,7 +274,7 @@
NsBindings lBindings;
lChild.getNamespaceBindings(lBindings,
- store::StoreConsts::ONLY_LOCAL_NAMESPACES);
+ store::StoreConsts::ONLY_LOCAL_BINDINGS);
for (NsBindings::const_iterator ite = lBindings.begin();
ite != lBindings.end(); ++ite) {
std::coutnamespace binding ite-first
=== modified file 'include/zorba/item.h'
--- include/zorba/item.h 2013-06-15 02:57:08 +
+++ include/zorba/item.h 2013-06-29 18:40:35 +
@@ -316,18 +316,21 @@
* The file \link simple.cpp \endlink contains some basic examples that demonstrate
* the use of this function.
*
-* @param aBindings An STL list to receive the namespace bindings of this node (each
-* represented as a std::pairzorba::String,zorba::String where the
-* first string is the namespace prefix and the second is the namespace URI).
-* @param aNsScoping An instance of NsScoping to declare which bindings to return:
-* those local to the element; those local to all parent elements; or all bindings
-* (the default).
+* @param aBindings An std::vector to receive the namespace bindings of this
+*node (each represented as a std::pairzorba::String,zorba::String
+*where the first string is the namespace prefix and the second is the
+*namespace URI).
+* @param scope A value to specify which bindings to return: all bindings (the
+*default); only those that are specified by the namespace declaration
+*attributes of the node (if any); or those that are implied by the
+*qnames of the node and its attributes plus those that are specified
+*by the namespace declaration attributes of the node (if any)
* @throw ZorbaException if an error occured, e.g. the Item is not of type element.
*/
void
- getNamespaceBindings(NsBindings aBindings,
-store::StoreConsts::NsScoping aNsScoping = store::StoreConsts::ALL_NAMESPACES)
-const;
+ getNamespaceBindings(
+ NsBindings aBindings,
+ store::StoreConsts::NsScoping scope = store::StoreConsts::ALL_BINDINGS) const;
/** \brief Get parent of this (node) Item.
*
@@ -487,7 +490,7 @@
store::Item * m_item;
private:
//for plan serialization
- friend void zorba::serialization::operator(zorba::serialization::Archiver ar, Item obj);
+ friend void zorba::serialization::operator(zorba::serialization::Archiver ar, Item obj);
};
} // namespace zorba
=== modified file 'include/zorba/store_consts.h'
--- include/zorba/store_consts.h 2013-03-12 17:03:31 +
+++ include/zorba/store_consts.h 2013-06-29 18:40:35 +
@@ -98,11 +98,29 @@
{
public:
+ /**
+ * NsScoping defines the three values that can be given as arguments to
+ * the Item::getNamespaceBindings() method. The semantics of the three
+ * values are as follows:
+ *
+ * ALL_BINDINGS:
+ * All the namespace bindings of an element node, as defined by the W3C
+ * XQuery and XPath Data Model specification.
+ *
+ * ONLY_LOCAL_BINDINGS:
+ * The bindings that are implied by the qnames of an element node and its
+ * attributes, plus those that are specified by the namespace declaration
+ * attributes of the element node.
+ *
+ * ONLY_LOCALLY_DECLARED_BINDINGS:
+ * The bindings that are specified by the namespace declaration attributes
+ * of an element node.
+ */
enum NsScoping
{
-ALL_NAMESPACES,
-ONLY_LOCAL_NAMESPACES,
-ONLY_PARENT_NAMESPACES
+ALL_BINDINGS,
+ONLY_LOCAL_BINDINGS,
+ONLY_LOCALLY_DECLARED_BINDINGS
};
enum NodeKind
=== modified file