Merge lp:~zorba-coders/zorba/bug891209-xsiType into lp:zorba
- bug891209-xsiType
- Merge into trunk
Status: | Superseded | ||||
---|---|---|---|---|---|
Proposed branch: | lp:~zorba-coders/zorba/bug891209-xsiType | ||||
Merge into: | lp:zorba | ||||
Diff against target: |
305 lines (+72/-35) 14 files modified
ChangeLog (+1/-0) include/zorba/static_context_consts.h (+1/-1) src/api/staticcontextimpl.cpp (+3/-0) src/compiler/parser/parse_constants.h (+1/-0) src/context/static_context.cpp (+13/-4) src/context/static_context_consts.h (+1/-0) src/types/schema/EventSchemaValidator.cpp (+2/-2) src/types/schema/SchemaValidatorFilter.cpp (+4/-2) src/types/schema/XercSchemaValidator.cpp (+2/-2) src/types/schema/validate.cpp (+24/-18) src/types/typemanagerimpl.cpp (+5/-5) test/rbkt/ExpQueryResults/zorba/schemas/val-xsiType-noSchemaImport.xml.res (+1/-0) test/rbkt/Queries/zorba/schemas/val-xsiType-noSchemaImport.xq (+11/-0) test/rbkt/testdriver_common.cpp (+3/-1) |
||||
To merge this branch: | bzr merge lp:~zorba-coders/zorba/bug891209-xsiType | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Matthias Brantner | Pending | ||
Markos Zaharioudakis | Pending | ||
Review via email: mp+96001@code.launchpad.net |
This proposal supersedes a proposal from 2012-03-01.
This proposal has been superseded by a proposal from 2012-03-05.
Commit message
Fix for bug 891209 : validation with xsi:type returns untyped.
Description of the change
Fix for bug 891209 : validation with xsi:type returns untyped.
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal | # |
Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal | # |
Looks good to me but I would feel more comfortable if Markos already took a look at it.
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal | # |
The attempt to merge lp:~zorba-coders/zorba/bug891209-xsiType into lp:zorba failed. Below is the output from the failed tests.
Traceback (most recent call last):
File "/home/
sys.
File "/home/
credentials
File "/home/
credential_
File "/home/
service_root, cache, timeout, proxy_info, version)
File "/home/
credentials, service_root, cache, timeout, proxy_info, version)
File "/home/
self._wadl = self._browser.
File "/home/
response, content = self._request(url, media_type=
File "/home/
str(url), method=method, body=data, headers=headers)
File "/home/
url, method=method, body=body, headers=headers)
File "/home/
(response, new_content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "/home/
LaunchpadOA
File "/home/
redirections, cachekey)
File "/home/
(response, content) = self._conn_
File "/home/
conn.connect()
File "/home/
self.
File "/home/
cert_
File "/home/
ciphers=
File "/home/
self.
File "/home/
self.
ssl.SSLError: [Errno 8] _ssl.c:503: EOF occurred in violation of protocol
CMake Error at /home/ceej/
Validation...
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal | # |
The attempt to merge lp:~zorba-coders/zorba/bug891209-xsiType into lp:zorba failed. Below is the output from the failed tests.
CMake Error at /home/ceej/
Validation queue job bug891209-xsiType-
finished. The final status was:
2 tests did not succeed - changes not commited.
Error in read script: /home/ceej/
Unmerged revisions
Preview Diff
1 | === modified file 'ChangeLog' | |||
2 | --- ChangeLog 2012-03-01 21:22:16 +0000 | |||
3 | +++ ChangeLog 2012-03-05 21:09:22 +0000 | |||
4 | @@ -58,6 +58,7 @@ | |||
5 | 58 | * Fixed bug with unversioned modules with C++ external functions | 58 | * Fixed bug with unversioned modules with C++ external functions |
6 | 59 | * Fixed bug #878508 (JSON Module not escaping escape characters) | 59 | * Fixed bug #878508 (JSON Module not escaping escape characters) |
7 | 60 | * Fixed bug #912579 (validate-in-place on non-root elements) | 60 | * Fixed bug #912579 (validate-in-place on non-root elements) |
8 | 61 | * Fixed bug #891209 (validation with xsi:type returns untyped) | ||
9 | 61 | 62 | ||
10 | 62 | version 2.1 | 63 | version 2.1 |
11 | 63 | 64 | ||
12 | 64 | 65 | ||
13 | === modified file 'include/zorba/static_context_consts.h' | |||
14 | --- include/zorba/static_context_consts.h 2011-10-07 21:22:20 +0000 | |||
15 | +++ include/zorba/static_context_consts.h 2012-03-05 21:09:22 +0000 | |||
16 | @@ -58,7 +58,7 @@ | |||
17 | 58 | /** \brief Revalidation mode as defined in | 58 | /** \brief Revalidation mode as defined in |
18 | 59 | * http://www.w3.org/TR/xquery-update-10/#id-revalidation-declaration | 59 | * http://www.w3.org/TR/xquery-update-10/#id-revalidation-declaration |
19 | 60 | */ | 60 | */ |
21 | 61 | typedef enum { validate_skip, validate_lax, validate_strict } validation_mode_t; | 61 | typedef enum { validate_skip, validate_lax, validate_lax_dtd, validate_strict } validation_mode_t; |
22 | 62 | 62 | ||
23 | 63 | /** \brief Maintenance mode of an index as defined | 63 | /** \brief Maintenance mode of an index as defined |
24 | 64 | * in the XQuery Data Definition Facility | 64 | * in the XQuery Data Definition Facility |
25 | 65 | 65 | ||
26 | === modified file 'src/api/staticcontextimpl.cpp' | |||
27 | --- src/api/staticcontextimpl.cpp 2012-02-28 20:45:43 +0000 | |||
28 | +++ src/api/staticcontextimpl.cpp 2012-03-05 21:09:22 +0000 | |||
29 | @@ -1247,6 +1247,9 @@ | |||
30 | 1247 | case validate_lax: | 1247 | case validate_lax: |
31 | 1248 | valMode = StaticContextConsts::lax_validation; | 1248 | valMode = StaticContextConsts::lax_validation; |
32 | 1249 | break; | 1249 | break; |
33 | 1250 | case validate_lax_dtd: | ||
34 | 1251 | valMode = StaticContextConsts::lax_dtd_validation; | ||
35 | 1252 | break; | ||
36 | 1250 | case validate_skip: | 1253 | case validate_skip: |
37 | 1251 | valMode = StaticContextConsts::skip_validation; | 1254 | valMode = StaticContextConsts::skip_validation; |
38 | 1252 | break; | 1255 | break; |
39 | 1253 | 1256 | ||
40 | === modified file 'src/compiler/parser/parse_constants.h' | |||
41 | --- src/compiler/parser/parse_constants.h 2011-06-14 17:26:33 +0000 | |||
42 | +++ src/compiler/parser/parse_constants.h 2012-03-05 21:09:22 +0000 | |||
43 | @@ -103,6 +103,7 @@ | |||
44 | 103 | { | 103 | { |
45 | 104 | val_strict, | 104 | val_strict, |
46 | 105 | val_lax, | 105 | val_lax, |
47 | 106 | val_dtd_lax, | ||
48 | 106 | val_typename | 107 | val_typename |
49 | 107 | }; | 108 | }; |
50 | 108 | 109 | ||
51 | 109 | 110 | ||
52 | === modified file 'src/context/static_context.cpp' | |||
53 | --- src/context/static_context.cpp 2012-02-16 14:11:02 +0000 | |||
54 | +++ src/context/static_context.cpp 2012-03-05 21:09:22 +0000 | |||
55 | @@ -1735,10 +1735,19 @@ | |||
56 | 1735 | store::Item_t typeName; | 1735 | store::Item_t typeName; |
57 | 1736 | QueryLoc loc; | 1736 | QueryLoc loc; |
58 | 1737 | 1737 | ||
63 | 1738 | ParseConstants::validation_mode_t mode = | 1738 | ParseConstants::validation_mode_t mode; |
64 | 1739 | (validationMode == StaticContextConsts::strict_validation ? | 1739 | switch( validationMode ) |
65 | 1740 | ParseConstants::val_strict : | 1740 | { |
66 | 1741 | ParseConstants::val_lax ); | 1741 | case StaticContextConsts::strict_validation: |
67 | 1742 | mode = ParseConstants::val_strict; | ||
68 | 1743 | break; | ||
69 | 1744 | case StaticContextConsts::lax_dtd_validation: | ||
70 | 1745 | mode = ParseConstants::val_dtd_lax; | ||
71 | 1746 | break; | ||
72 | 1747 | case StaticContextConsts::lax_validation: | ||
73 | 1748 | default: | ||
74 | 1749 | mode = ParseConstants::val_lax; | ||
75 | 1750 | } | ||
76 | 1742 | 1751 | ||
77 | 1743 | return Validator::effectiveValidationValue(validatedResult, | 1752 | return Validator::effectiveValidationValue(validatedResult, |
78 | 1744 | rootElement, | 1753 | rootElement, |
79 | 1745 | 1754 | ||
80 | === modified file 'src/context/static_context_consts.h' | |||
81 | --- src/context/static_context_consts.h 2012-01-11 17:30:25 +0000 | |||
82 | +++ src/context/static_context_consts.h 2012-03-05 21:09:22 +0000 | |||
83 | @@ -90,6 +90,7 @@ | |||
84 | 90 | validation_unknown, | 90 | validation_unknown, |
85 | 91 | strict_validation, | 91 | strict_validation, |
86 | 92 | lax_validation, | 92 | lax_validation, |
87 | 93 | lax_dtd_validation, | ||
88 | 93 | skip_validation | 94 | skip_validation |
89 | 94 | }; | 95 | }; |
90 | 95 | 96 | ||
91 | 96 | 97 | ||
92 | === modified file 'src/types/schema/EventSchemaValidator.cpp' | |||
93 | --- src/types/schema/EventSchemaValidator.cpp 2011-08-19 03:26:59 +0000 | |||
94 | +++ src/types/schema/EventSchemaValidator.cpp 2012-03-05 21:09:22 +0000 | |||
95 | @@ -163,7 +163,7 @@ | |||
96 | 163 | StrX typeName(theSchemaValidatorFilter->getTypeName()); | 163 | StrX typeName(theSchemaValidatorFilter->getTypeName()); |
97 | 164 | StrX typeUri(theSchemaValidatorFilter->getTypeUri()); | 164 | StrX typeUri(theSchemaValidatorFilter->getTypeUri()); |
98 | 165 | 165 | ||
100 | 166 | //cout << " - getTypeQName: " << typeName << "@" << typeUri <<" "; | 166 | //cout << " - getTypeQName: " << typeName << " @ " << typeUri <<" "; |
101 | 167 | 167 | ||
102 | 168 | store::Item_t typeQName; | 168 | store::Item_t typeQName; |
103 | 169 | GENV_ITEMFACTORY->createQName(typeQName, | 169 | GENV_ITEMFACTORY->createQName(typeQName, |
104 | @@ -172,7 +172,7 @@ | |||
105 | 172 | typeName.localFormOrDefault ("untyped")); | 172 | typeName.localFormOrDefault ("untyped")); |
106 | 173 | 173 | ||
107 | 174 | //cout << " : " << typeQName->getLocalName() << " @ " | 174 | //cout << " : " << typeQName->getLocalName() << " @ " |
109 | 175 | // << typeQName->getNamespace() <<"\n"; | 175 | // << typeQName->getNamespace() <<"\n"; std::cout.flush(); |
110 | 176 | 176 | ||
111 | 177 | return typeQName; | 177 | return typeQName; |
112 | 178 | } | 178 | } |
113 | 179 | 179 | ||
114 | === modified file 'src/types/schema/SchemaValidatorFilter.cpp' | |||
115 | --- src/types/schema/SchemaValidatorFilter.cpp 2011-06-14 17:26:33 +0000 | |||
116 | +++ src/types/schema/SchemaValidatorFilter.cpp 2012-03-05 21:09:22 +0000 | |||
117 | @@ -867,7 +867,7 @@ | |||
118 | 867 | } | 867 | } |
119 | 868 | --theAttrCount; // remove att from the list but still needs to be reported | 868 | --theAttrCount; // remove att from the list but still needs to be reported |
120 | 869 | 869 | ||
122 | 870 | //cout << " svf attrEvent: " << StrX(localname) << " T: " << | 870 | //std::cout << " svf attrEvent: " << StrX(localname) << " T: " << |
123 | 871 | // StrX(typeName) << "\n"; | 871 | // StrX(typeName) << "\n"; |
124 | 872 | theEventBuffer->attributeEvent(emptyToNull(prefix), emptyToNull(uri), | 872 | theEventBuffer->attributeEvent(emptyToNull(prefix), emptyToNull(uri), |
125 | 873 | localname, value, emptyToNull(typeURI), typeName); | 873 | localname, value, emptyToNull(typeURI), typeName); |
126 | @@ -1062,7 +1062,9 @@ | |||
127 | 1062 | { | 1062 | { |
128 | 1063 | const ElemStack::StackElem* topElem = fElemStack.topElement(); | 1063 | const ElemStack::StackElem* topElem = fElemStack.topElement(); |
129 | 1064 | DatatypeValidator *currentDV = 0; | 1064 | DatatypeValidator *currentDV = 0; |
131 | 1065 | if(topElem->fThisElement->isDeclared()) | 1065 | if(topElem->fThisElement->isDeclared() || |
132 | 1066 | theXsiType // this is when there is no schema import but xsiType is used | ||
133 | 1067 | ) | ||
134 | 1066 | { | 1068 | { |
135 | 1067 | ComplexTypeInfo *currentTypeInfo = ((XercSchemaValidator*)fValidator)-> | 1069 | ComplexTypeInfo *currentTypeInfo = ((XercSchemaValidator*)fValidator)-> |
136 | 1068 | getCurrentTypeInfo(); | 1070 | getCurrentTypeInfo(); |
137 | 1069 | 1071 | ||
138 | === modified file 'src/types/schema/XercSchemaValidator.cpp' | |||
139 | --- src/types/schema/XercSchemaValidator.cpp 2011-06-14 17:26:33 +0000 | |||
140 | +++ src/types/schema/XercSchemaValidator.cpp 2012-03-05 21:09:22 +0000 | |||
141 | @@ -23,7 +23,6 @@ | |||
142 | 23 | // Includes | 23 | // Includes |
143 | 24 | // --------------------------------------------------------------------------- | 24 | // --------------------------------------------------------------------------- |
144 | 25 | #include "stdafx.h" | 25 | #include "stdafx.h" |
145 | 26 | #include "XercSchemaValidator.h" | ||
146 | 27 | 26 | ||
147 | 28 | #include <xercesc/util/Janitor.hpp> | 27 | #include <xercesc/util/Janitor.hpp> |
148 | 29 | #include <xercesc/framework/XMLDocumentHandler.hpp> | 28 | #include <xercesc/framework/XMLDocumentHandler.hpp> |
149 | @@ -54,7 +53,8 @@ | |||
150 | 54 | 53 | ||
151 | 55 | 54 | ||
152 | 56 | #include "diagnostics/assert.h" | 55 | #include "diagnostics/assert.h" |
154 | 57 | //#include "StrX.h" | 56 | #include "StrX.h" |
155 | 57 | #include "XercSchemaValidator.h" | ||
156 | 58 | 58 | ||
157 | 59 | using namespace XERCES_CPP_NAMESPACE; | 59 | using namespace XERCES_CPP_NAMESPACE; |
158 | 60 | 60 | ||
159 | 61 | 61 | ||
160 | === modified file 'src/types/schema/validate.cpp' | |||
161 | --- src/types/schema/validate.cpp 2011-09-22 21:50:20 +0000 | |||
162 | +++ src/types/schema/validate.cpp 2012-03-05 21:09:22 +0000 | |||
163 | @@ -54,7 +54,7 @@ | |||
164 | 54 | #include "diagnostics/assert.h" | 54 | #include "diagnostics/assert.h" |
165 | 55 | #include "zorba/store_consts.h" | 55 | #include "zorba/store_consts.h" |
166 | 56 | 56 | ||
168 | 57 | using namespace std; | 57 | //using namespace std; |
169 | 58 | 58 | ||
170 | 59 | namespace zorba | 59 | namespace zorba |
171 | 60 | { | 60 | { |
172 | @@ -145,15 +145,21 @@ | |||
173 | 145 | //cout << "No schema: isNode() " << sourceNode->isNode() << " nodeKind: "<< | 145 | //cout << "No schema: isNode() " << sourceNode->isNode() << " nodeKind: "<< |
174 | 146 | // sourceNode->getNodeKind() << endl; | 146 | // sourceNode->getNodeKind() << endl; |
175 | 147 | 147 | ||
183 | 148 | if ( validationMode == ParseConstants::val_strict ) | 148 | if ( validationMode == ParseConstants::val_dtd_lax) |
184 | 149 | { | 149 | { |
185 | 150 | throw XQUERY_EXCEPTION( err::XQDY0084, ERROR_LOC( loc ) ); | 150 | // when dtd validation enabled avoid using schema object |
179 | 151 | } | ||
180 | 152 | else | ||
181 | 153 | { | ||
182 | 154 | // no schema available - items remain the same | ||
186 | 155 | result = sourceNode; | 151 | result = sourceNode; |
188 | 156 | return true; | 152 | return true; |
189 | 153 | } | ||
190 | 154 | else | ||
191 | 155 | { | ||
192 | 156 | // if we got here it basicaly means that there was no import but | ||
193 | 157 | // validation is used so we need to set up schema in the typeManager anyway | ||
194 | 158 | // validation has to work for xsiType and built-in types | ||
195 | 159 | |||
196 | 160 | TypeManagerImpl *typeManagerImpl = static_cast<TypeManagerImpl*>(typeManager); | ||
197 | 161 | typeManagerImpl->initializeSchema(); | ||
198 | 162 | schema = typeManager->getSchema(); | ||
199 | 157 | } | 163 | } |
200 | 158 | } | 164 | } |
201 | 159 | 165 | ||
202 | @@ -382,8 +388,8 @@ | |||
203 | 382 | ZORBA_ASSERT(attribute->isNode()); | 388 | ZORBA_ASSERT(attribute->isNode()); |
204 | 383 | ZORBA_ASSERT(attribute->getNodeKind() == store::StoreConsts::attributeNode); | 389 | ZORBA_ASSERT(attribute->getNodeKind() == store::StoreConsts::attributeNode); |
205 | 384 | 390 | ||
208 | 385 | //cout << " v - attr: " << attribute->getNodeName()->getLocalName()-> | 391 | //cout << " v - attr: " << attribute->getNodeName()->getLocalName() << ":" << |
209 | 386 | // c_str() << "\n"; cout.flush(); | 392 | // attribute->getStringValue() << "\n"; cout.flush(); |
210 | 387 | 393 | ||
211 | 388 | store::Item_t attName = attribute->getNodeName(); | 394 | store::Item_t attName = attribute->getNodeName(); |
212 | 389 | schemaValidator.attr(attName, attribute->getStringValue()); | 395 | schemaValidator.attr(attName, attribute->getStringValue()); |
213 | @@ -472,9 +478,9 @@ | |||
214 | 472 | { | 478 | { |
215 | 473 | if ( child->isNode() ) | 479 | if ( child->isNode() ) |
216 | 474 | { | 480 | { |
220 | 475 | //cout << " > child: " << child->getNodeKind() << " " << | 481 | //cout << " > child: " << (long)child->getNodeKind() << " " << |
221 | 476 | // (child->getType() != NULL ? child->getType()->getLocalName() | 482 | // //(child->getType() != NULL ? child->getType()->getLocalName() : "type_NULL" ) << |
222 | 477 | // : "type_NULL" ) << "\n"; cout.flush(); | 483 | // "\n"; cout.flush(); |
223 | 478 | 484 | ||
224 | 479 | switch ( child->getNodeKind() ) | 485 | switch ( child->getNodeKind() ) |
225 | 480 | { | 486 | { |
226 | @@ -515,7 +521,7 @@ | |||
227 | 515 | cout << " - text: '" << childStringValue << "' T: " << | 521 | cout << " - text: '" << childStringValue << "' T: " << |
228 | 516 | typeQName->getLocalName() << "\n"; cout.flush(); | 522 | typeQName->getLocalName() << "\n"; cout.flush(); |
229 | 517 | cout << " xqT: " << xqType->toString() << " content_kind: " << | 523 | cout << " xqT: " << xqType->toString() << " content_kind: " << |
231 | 518 | xqType->content_kind() << " tKind:" << xqType->type_kind() << " \n"; | 524 | (long)xqType->content_kind() << " tKind:" << (long)xqType->type_kind() << " \n"; |
232 | 519 | cout.flush(); | 525 | cout.flush(); |
233 | 520 | } | 526 | } |
234 | 521 | else | 527 | else |
235 | @@ -649,9 +655,9 @@ | |||
236 | 649 | xqtref_t type = typeManager->create_named_type(typeQName.getp(), | 655 | xqtref_t type = typeManager->create_named_type(typeQName.getp(), |
237 | 650 | TypeConstants::QUANT_ONE); | 656 | TypeConstants::QUANT_ONE); |
238 | 651 | 657 | ||
242 | 652 | //cout << " - processTextValue: " << typeQName->getPrefix()->str() | 658 | //cout << " - processTextValue: " << typeQName->getPrefix() |
243 | 653 | // << ":" << typeQName->getLocalName()->str() << "@" | 659 | // << ":" << typeQName->getLocalName() << "@" |
244 | 654 | // << typeQName->getNamespace()->str() ; cout.flush(); | 660 | // << typeQName->getNamespace() ; cout.flush(); |
245 | 655 | //cout << " type: " << (type==NULL ? "NULL" : type->toString()) << "\n"; cout.flush(); | 661 | //cout << " type: " << (type==NULL ? "NULL" : type->toString()) << "\n"; cout.flush(); |
246 | 656 | 662 | ||
247 | 657 | // TODO: we probably need the ns bindings from the static context | 663 | // TODO: we probably need the ns bindings from the static context |
248 | 658 | 664 | ||
249 | === modified file 'src/types/typemanagerimpl.cpp' | |||
250 | --- src/types/typemanagerimpl.cpp 2012-01-26 19:56:14 +0000 | |||
251 | +++ src/types/typemanagerimpl.cpp 2012-03-05 21:09:22 +0000 | |||
252 | @@ -336,11 +336,11 @@ | |||
253 | 336 | { | 336 | { |
254 | 337 | if (error != zerr::ZXQP0000_NO_ERROR) | 337 | if (error != zerr::ZXQP0000_NO_ERROR) |
255 | 338 | { | 338 | { |
261 | 339 | throw XQUERY_EXCEPTION_VAR( | 339 | throw XQUERY_EXCEPTION_VAR( |
262 | 340 | error, | 340 | error, |
263 | 341 | ERROR_PARAMS(qname->getStringValue(), ZED(NotAmongInScopeSchemaTypes)), | 341 | ERROR_PARAMS(qname->getStringValue(), ZED(NotAmongInScopeSchemaTypes)), |
264 | 342 | ERROR_LOC( loc ) | 342 | ERROR_LOC( loc ) |
265 | 343 | ); | 343 | ); |
266 | 344 | } | 344 | } |
267 | 345 | else | 345 | else |
268 | 346 | { | 346 | { |
269 | 347 | 347 | ||
270 | === added file 'test/rbkt/ExpQueryResults/zorba/schemas/val-xsiType-noSchemaImport.xml.res' | |||
271 | --- test/rbkt/ExpQueryResults/zorba/schemas/val-xsiType-noSchemaImport.xml.res 1970-01-01 00:00:00 +0000 | |||
272 | +++ test/rbkt/ExpQueryResults/zorba/schemas/val-xsiType-noSchemaImport.xml.res 2012-03-05 21:09:22 +0000 | |||
273 | @@ -0,0 +1,1 @@ | |||
274 | 1 | xs:integer | ||
275 | 0 | 2 | ||
276 | === added file 'test/rbkt/Queries/zorba/schemas/val-xsiType-noSchemaImport.xq' | |||
277 | --- test/rbkt/Queries/zorba/schemas/val-xsiType-noSchemaImport.xq 1970-01-01 00:00:00 +0000 | |||
278 | +++ test/rbkt/Queries/zorba/schemas/val-xsiType-noSchemaImport.xq 2012-03-05 21:09:22 +0000 | |||
279 | @@ -0,0 +1,11 @@ | |||
280 | 1 | import module namespace schema = "http://www.zorba-xquery.com/modules/schema"; | ||
281 | 2 | |||
282 | 3 | schema:schema-type( | ||
283 | 4 | data( | ||
284 | 5 | validate lax { | ||
285 | 6 | <a | ||
286 | 7 | xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
287 | 8 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
288 | 9 | xsi:type="xs:integer">2</a> } | ||
289 | 10 | ) | ||
290 | 11 | ) | ||
291 | 0 | 12 | ||
292 | === modified file 'test/rbkt/testdriver_common.cpp' | |||
293 | --- test/rbkt/testdriver_common.cpp 2012-01-11 17:30:25 +0000 | |||
294 | +++ test/rbkt/testdriver_common.cpp 2012-03-05 21:09:22 +0000 | |||
295 | @@ -439,7 +439,9 @@ | |||
296 | 439 | 439 | ||
297 | 440 | assert (lDoc.getNodeKind() == zorba::store::StoreConsts::documentNode); | 440 | assert (lDoc.getNodeKind() == zorba::store::StoreConsts::documentNode); |
298 | 441 | zorba::Item lValidatedDoc; | 441 | zorba::Item lValidatedDoc; |
300 | 442 | sctx->validate(lDoc, lValidatedDoc, zorba::validate_lax); | 442 | zorba::validation_mode_t validationMode = enableDtd ? zorba::validate_lax_dtd : |
301 | 443 | zorba::validate_lax; | ||
302 | 444 | sctx->validate(lDoc, lValidatedDoc, validationMode); | ||
303 | 443 | 445 | ||
304 | 444 | lDocMgr->put(val, lValidatedDoc); | 446 | lDocMgr->put(val, lValidatedDoc); |
305 | 445 | lDoc = lDocMgr->document(val); | 447 | lDoc = lDocMgr->document(val); |
There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.