Merge lp:~zorba-coders/zorba/1181360 into lp:zorba

Proposed by Luis Rodriguez Gonzalez
Status: Merged
Merged at revision: 11633
Proposed branch: lp:~zorba-coders/zorba/1181360
Merge into: lp:zorba
Diff against target: 58 lines (+15/-0)
4 files modified
src/diagnostics/diagnostic_en.xml (+4/-0)
src/diagnostics/pregenerated/dict_en.cpp (+1/-0)
src/diagnostics/pregenerated/dict_zed_keys.h (+1/-0)
src/types/schema/validate.cpp (+9/-0)
To merge this branch: bzr merge lp:~zorba-coders/zorba/1181360
Reviewer Review Type Date Requested Status
Cezar Andrei Approve
Luis Rodriguez Gonzalez Approve
Review via email: mp+167690@code.launchpad.net

Commit message

Fixed validation with no root element.

To post a comment you must log in.
Revision history for this message
Luis Rodriguez Gonzalez (kuraru) :
review: Approve
Revision history for this message
Cezar Andrei (cezar-andrei) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/1181360/+merge/167690

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting criteria failed for the following merge proposals:

https://code.launchpad.net/~zorba-coders/zorba/1181360/+merge/167690 :
Votes: {'Approve': 2, 'Needs commit message': 1}

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/1181360/+merge/167690

Stage "CommitZorba" failed.

Check console output at http://jenkins.lambda.nu/job/CommitZorba/192/console to view the results.

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/1181360/+merge/167690

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue succeeded - proposal merged!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/diagnostics/diagnostic_en.xml'
2--- src/diagnostics/diagnostic_en.xml 2013-06-04 00:34:52 +0000
3+++ src/diagnostics/diagnostic_en.xml 2013-06-06 04:36:34 +0000
4@@ -3676,6 +3676,10 @@
5 <entry key="DocNodeMultipleElements">
6 <value>document node has more than one element</value>
7 </entry>
8+
9+ <entry key="DocNodeNoElements">
10+ <value>document node doesn't contain any elements, must contain exactly one element</value>
11+ </entry>
12
13 <entry key="EBVNotDefSeq_5">
14 <value>effective boolean value not defined for sequence of more than one item that starts with "$5"</value>
15
16=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
17--- src/diagnostics/pregenerated/dict_en.cpp 2013-06-04 01:32:30 +0000
18+++ src/diagnostics/pregenerated/dict_en.cpp 2013-06-06 04:36:34 +0000
19@@ -610,6 +610,7 @@
20 { "~DivisionNoINF", "division can not have +-INF dividend" },
21 { "~DivisionNoNaN", "division can not involve NaN" },
22 { "~DocNodeMultipleElements", "document node has more than one element" },
23+ { "~DocNodeNoElements", "document node doesn't contain any elements, must contain exactly one element" },
24 { "~EBVNotDefSeq_5", "effective boolean value not defined for sequence of more than one item that starts with \"$5\"" },
25 { "~EffectiveBooleanValue", "effective boolean value" },
26 { "~ElementName", "element name" },
27
28=== modified file 'src/diagnostics/pregenerated/dict_zed_keys.h'
29--- src/diagnostics/pregenerated/dict_zed_keys.h 2013-05-16 22:26:07 +0000
30+++ src/diagnostics/pregenerated/dict_zed_keys.h 2013-06-06 04:36:34 +0000
31@@ -223,6 +223,7 @@
32 #define ZED_DivisionNoINF "~DivisionNoINF"
33 #define ZED_DivisionNoNaN "~DivisionNoNaN"
34 #define ZED_DocNodeMultipleElements "~DocNodeMultipleElements"
35+#define ZED_DocNodeNoElements "~DocNodeNoElements"
36 #define ZED_EBVNotDefSeq_5 "~EBVNotDefSeq_5"
37 #define ZED_EffectiveBooleanValue "~EffectiveBooleanValue"
38 #define ZED_ElementName "~ElementName"
39
40=== modified file 'src/types/schema/validate.cpp'
41--- src/types/schema/validate.cpp 2013-05-21 21:44:25 +0000
42+++ src/types/schema/validate.cpp 2013-06-06 04:36:34 +0000
43@@ -136,6 +136,15 @@
44 nr_child_elements++;
45 }
46 }
47+ // if nr_child_elements == 0 thow an error since it means there isn't any child element
48+ if(nr_child_elements == 0)
49+ {
50+ throw XQUERY_EXCEPTION(
51+ err::XQDY0061,
52+ ERROR_PARAMS( ZED( DocNodeNoElements ) ),
53+ ERROR_LOC( loc )
54+ );
55+ }
56 }
57
58 Schema* schema = typeManager->getSchema();

Subscribers

People subscribed via source and target branches