Merge lp:~zorba-coders/zorba/bug1023362-xsiTypeIgnored into lp:zorba
- bug1023362-xsiTypeIgnored
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Cezar Andrei | ||||
Approved revision: | 11202 | ||||
Merged at revision: | 11228 | ||||
Proposed branch: | lp:~zorba-coders/zorba/bug1023362-xsiTypeIgnored | ||||
Merge into: | lp:zorba | ||||
Diff against target: |
485 lines (+84/-47) 7 files modified
ChangeLog (+1/-0) src/types/schema/EventSchemaValidator.cpp (+13/-13) src/types/schema/SchemaValidatorFilter.cpp (+24/-17) src/types/schema/XercSchemaValidator.cpp (+9/-1) src/types/schema/XercSchemaValidator.h (+17/-16) test/rbkt/ExpQueryResults/zorba/schemas/val-laxXsiType.xml.res (+2/-0) test/rbkt/Queries/zorba/schemas/val-laxXsiType.xq (+18/-0) |
||||
To merge this branch: | bzr merge lp:~zorba-coders/zorba/bug1023362-xsiTypeIgnored | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Matthias Brantner | Approve | ||
Markos Zaharioudakis | Approve | ||
Cezar Andrei | Approve | ||
Review via email: mp+146224@code.launchpad.net |
Commit message
Fix for bug1023362-xsi:Type Ignored during lax validation.
Description of the change
Fix for bug1023362-xsi:Type Ignored during lax validation.
Zorba Build Bot (zorba-buildbot) wrote : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job bug1023362-xsiTypeIgnored
All tests succeeded!
Zorba Build Bot (zorba-buildbot) wrote : | # |
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 1 Pending.
Cezar Andrei (cezar-andrei) : | # |
Matthias Brantner (matthias-brantner) wrote : | # |
Markos has opened a bug. Hence, I have added him as a reviewer.
At least, the ChangeLog should be updated.
Markos Zaharioudakis (markos-za) : | # |
Cezar Andrei (cezar-andrei) wrote : | # |
Added entry in ChangeLog.
Zorba Build Bot (zorba-buildbot) wrote : | # |
Attempt to merge into lp:zorba failed due to conflicts:
text conflict in ChangeLog
Zorba Build Bot (zorba-buildbot) wrote : | # |
There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Matthias Brantner (matthias-brantner) : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job bug1023362-xsiTypeIgnored
All tests succeeded!
Preview Diff
1 | === modified file 'ChangeLog' |
2 | --- ChangeLog 2013-02-08 22:14:56 +0000 |
3 | +++ ChangeLog 2013-02-08 23:12:24 +0000 |
4 | @@ -24,6 +24,7 @@ |
5 | * Fixed bug #1099535 (xml:parse endless loop) |
6 | * Fixed bug #866958 (Parsing error not explicit enough) |
7 | * Fixed bug #867068: (Incorrect usage of XQDY0027) |
8 | + * Fixed bug #1023362 (xsi:type attribute ignored during validation) |
9 | |
10 | |
11 | version 2.8 |
12 | |
13 | === modified file 'src/types/schema/EventSchemaValidator.cpp' |
14 | --- src/types/schema/EventSchemaValidator.cpp 2012-09-19 21:16:15 +0000 |
15 | +++ src/types/schema/EventSchemaValidator.cpp 2013-02-08 23:12:24 +0000 |
16 | @@ -94,7 +94,7 @@ |
17 | |
18 | void EventSchemaValidator::startElem(store::Item_t elemName) |
19 | { |
20 | - //cout << " sv SElem: " << elemName->getLocalName() << "\n"; |
21 | + //cout << "\n esv SElem: " << elemName->getLocalName() << "\n"; std::cout.flush(); |
22 | |
23 | XMLChArray prefix(elemName->getPrefix()); |
24 | XMLChArray uri(elemName->getNamespace()); |
25 | @@ -105,7 +105,7 @@ |
26 | |
27 | void EventSchemaValidator::endElem(store::Item_t elemName) |
28 | { |
29 | - //cout << " sv EElem: " << elemName->getLocalName() << "\n"; |
30 | + //cout << " esv EElem: " << elemName->getLocalName() << "\n"; std::cout.flush(); |
31 | |
32 | XMLChArray prefix(elemName->getPrefix()); |
33 | XMLChArray uri(elemName->getNamespace()); |
34 | @@ -118,8 +118,8 @@ |
35 | |
36 | void EventSchemaValidator::attr(store::Item_t attrName, const zstring& textValue) |
37 | { |
38 | - //cout << " sv Attr: " << attrName->getPrefix() << ":" |
39 | - // << attrName->getLocalName() << " = '" << textValue << "'\n"; |
40 | + //cout << " esv Attr: " << attrName->getPrefix() << ":" |
41 | + // << attrName->getLocalName() << " = '" << textValue << "'\n"; std::cout.flush(); |
42 | |
43 | XMLChArray prefix(attrName->getPrefix()); |
44 | XMLChArray uri(attrName->getNamespace()); |
45 | @@ -133,14 +133,14 @@ |
46 | |
47 | void EventSchemaValidator::endAttrs() |
48 | { |
49 | - //cout << " sv endAttrs \n"; |
50 | + //cout << " esv endAttrs \n"; std::cout.flush(); |
51 | theSchemaValidatorFilter->endAttributesEvent(); |
52 | } |
53 | |
54 | |
55 | void EventSchemaValidator::text(const zstring& textValue) |
56 | { |
57 | - //cout << " sv Text: '" << textValue << "'\n"; |
58 | + //cout << " esv Text: '" << textValue << "'\n"; std::cout.flush(); |
59 | |
60 | XMLChArray value(textValue); |
61 | theSchemaValidatorFilter->textEvent(value); |
62 | @@ -163,7 +163,7 @@ |
63 | StrX typeName(theSchemaValidatorFilter->getTypeName()); |
64 | StrX typeUri(theSchemaValidatorFilter->getTypeUri()); |
65 | |
66 | - //cout << " - getTypeQName: " << typeName << " @ " << typeUri <<" "; |
67 | + //cout << " esv - : getTypeQName: " << typeName << " @ " << typeUri <<"\n"; std::cout.flush(); |
68 | |
69 | store::Item_t typeQName; |
70 | GENV_ITEMFACTORY->createQName(typeQName, |
71 | @@ -171,8 +171,8 @@ |
72 | "", |
73 | typeName.localFormOrDefault ("untyped")); |
74 | |
75 | - //cout << " : " << typeQName->getLocalName() << " @ " |
76 | - // << typeQName->getNamespace() <<"\n"; std::cout.flush(); |
77 | + //cout << " " << typeQName->getLocalName() << " @ " |
78 | + // << typeQName->getNamespace() <<"\n"; std::cout.flush(); std::cout.flush(); |
79 | |
80 | return typeQName; |
81 | } |
82 | @@ -183,7 +183,7 @@ |
83 | StrX typeName(theSchemaValidatorFilter->getTypeName()); |
84 | StrX typeUri(theSchemaValidatorFilter->getTypeUri()); |
85 | |
86 | - //cout << " - getType: " << typeName << "@" << typeUri <<"\n"; |
87 | + //cout << " esv - : getType: " << typeName << "@" << typeUri <<"\n"; std::cout.flush(); |
88 | |
89 | store::Item_t typeQName; |
90 | GENV_ITEMFACTORY->createQName(typeQName, |
91 | @@ -191,7 +191,7 @@ |
92 | "", |
93 | typeName.localFormOrDefault ("untyped")); |
94 | |
95 | - xqtref_t type = theTypeManager->create_named_type(typeQName, |
96 | + xqtref_t type = theTypeManager->create_named_type(typeQName, |
97 | TypeConstants::QUANT_ONE, |
98 | QueryLoc::null); |
99 | return type; |
100 | @@ -229,7 +229,7 @@ |
101 | XMLChArray localname(typeQName->getLocalName()); |
102 | |
103 | //cout << " SType: " << typeQName->getLocalName() << " @ " |
104 | - // << typeQName->getNamespace() << "\n"; |
105 | + // << typeQName->getNamespace() << "\n"; std::cout.flush(); |
106 | |
107 | theSchemaValidatorFilter->startTypeEvent(uri, localname); |
108 | } |
109 | @@ -237,7 +237,7 @@ |
110 | |
111 | void EventSchemaValidator::endType() |
112 | { |
113 | - //cout << " EType \n"; |
114 | + //cout << " EType \n"; std::cout.flush(); |
115 | |
116 | theSchemaValidatorFilter->endTypeEvent(); |
117 | } |
118 | |
119 | === modified file 'src/types/schema/SchemaValidatorFilter.cpp' |
120 | --- src/types/schema/SchemaValidatorFilter.cpp 2013-01-25 22:32:28 +0000 |
121 | +++ src/types/schema/SchemaValidatorFilter.cpp 2013-02-08 23:12:24 +0000 |
122 | @@ -200,7 +200,7 @@ |
123 | const XMLCh *uri, |
124 | const XMLCh *localname) |
125 | { |
126 | - //cout << " svf startElememntEvent: " << StrX(localname) << " @ " << StrX(uri) << "\n"; |
127 | + //cout << " svf startElememntEvent: " << StrX(localname) << " @ " << StrX(uri) << "\n"; |
128 | if(theElementToProcess) |
129 | processStartElement(); |
130 | |
131 | @@ -229,12 +229,14 @@ |
132 | |
133 | void SchemaValidatorFilter::processStartElement() |
134 | { |
135 | + //std::cout << " svf - : processStartElement " << StrX(theLocalname.getRawBuffer()) << " v: " << fValidate << "\n"; std::cout.flush(); |
136 | bool isRoot = theParentStack == 0; |
137 | unsigned int uriId = fURIStringPool->addOrFind(theUri.getRawBuffer()); |
138 | |
139 | - // Handle xsi:type |
140 | - if( theXsiType ) |
141 | + if (theXsiType) |
142 | { |
143 | + // Handle xsi:type |
144 | + //std::cout << " svf - : procStartElemEvent2 xsi: " << StrX(theXsiType) << " v: " << fValidate << "\n"; std::cout.flush(); |
145 | int colonPos = -1; |
146 | unsigned int atUriId = resolveQName(theXsiType, |
147 | fPrefixBuf, |
148 | @@ -247,7 +249,6 @@ |
149 | } |
150 | |
151 | bool isProcessorStipulatedTypeName = false; |
152 | - |
153 | if( theProcessorStipulatedTypeName && isRoot ) |
154 | { |
155 | isProcessorStipulatedTypeName = true; |
156 | @@ -334,7 +335,7 @@ |
157 | getSubstitutionGroupElem(); |
158 | if (substitutedElem) |
159 | { |
160 | - //cout << " svf substitutedElem: " << |
161 | + //cout << " svf substitutedElem: " << |
162 | // StrX(substitutedElem->getFullName()) << "\n"; |
163 | theSubstitutedElemName = substitutedElem->getBaseName(); |
164 | theSubstitutedElemUri = (XMLCh*)fURIStringPool-> |
165 | @@ -342,7 +343,6 @@ |
166 | } |
167 | } |
168 | |
169 | - |
170 | if(fValidate) |
171 | { |
172 | if (isProcessorStipulatedTypeName) |
173 | @@ -355,11 +355,17 @@ |
174 | fValidator->validateElement(elemDecl); |
175 | } |
176 | } |
177 | + else if (theXsiType) |
178 | + { |
179 | + //validate element even if lax but has xsi:type |
180 | + fValidator->validateElement(elemDecl); |
181 | + } |
182 | + |
183 | |
184 | ComplexTypeInfo* typeinfo = |
185 | (fValidate ? |
186 | - ((XercSchemaValidator*)fValidator)->getCurrentTypeInfo() : |
187 | - ((SchemaElementDecl*)elemDecl)->getComplexTypeInfo()); |
188 | + ((XercSchemaValidator*)fValidator)->getCurrentTypeInfo() : |
189 | + ((SchemaElementDecl*)elemDecl)->getComplexTypeInfo()); |
190 | |
191 | if(typeinfo) |
192 | { |
193 | @@ -452,7 +458,7 @@ |
194 | unsigned int uriId = attr->getURIId(); |
195 | const XMLCh *uri = getURIText(uriId); |
196 | |
197 | - //cout << " svf: processAttrs: " << StrX(localname) << "@" << StrX(uri) << |
198 | + //cout << " svf: processAttrs: " << StrX(localname) << "@" << StrX(uri) << |
199 | // " ='" << StrX(value) << "'" << endl; |
200 | |
201 | bool attrValid = true; |
202 | @@ -714,8 +720,8 @@ |
203 | if(theElementToProcess) |
204 | processStartElement(); |
205 | |
206 | - //cout << " svf: endElementEvent: " << StrX(localname) << "@" << StrX(uri) << |
207 | - // " type: " << StrX(typeName) << " @" << StrX(typeURI) << endl; |
208 | +// std::cout << " svf: endElementEvent1: " << StrX(localname) << "@" << StrX(uri) << |
209 | +// " type: " << StrX(typeName) << " @" << StrX(typeURI) << " v: " << fValidate << std::endl; |
210 | |
211 | typeURI = SchemaSymbols::fgURI_SCHEMAFORSCHEMA; |
212 | typeName = SchemaSymbols::fgATTVAL_ANYTYPE; |
213 | @@ -726,7 +732,7 @@ |
214 | // We commandeer fCommentOrPISeen to keep _errorOccurred in |
215 | theErrorOccurred = topElem->fCommentOrPISeen; |
216 | |
217 | - if(fValidate) |
218 | + if(fValidate || theXsiType) |
219 | { |
220 | DatatypeValidator *currentDV = 0; |
221 | if(topElem->fThisElement->isDeclared()) |
222 | @@ -867,7 +873,7 @@ |
223 | } |
224 | --theAttrCount; // remove att from the list but still needs to be reported |
225 | |
226 | - //std::cout << " svf attrEvent: " << StrX(localname) << " T: " << |
227 | + //std::cout << " svf attrEvent: " << StrX(localname) << " T: " << |
228 | // StrX(typeName) << "\n"; |
229 | theEventBuffer->attributeEvent(emptyToNull(prefix), emptyToNull(uri), |
230 | localname, value, emptyToNull(typeURI), typeName); |
231 | @@ -898,7 +904,8 @@ |
232 | while(*end) ++end; |
233 | unsigned int len = (unsigned int)(end - chars); |
234 | |
235 | - if(fValidate) |
236 | + // Also handle xsi:type |
237 | + if(fValidate || theXsiType) |
238 | { |
239 | // Get the character data opts for the current element |
240 | XMLElementDecl::CharDataOpts charOpts = XMLElementDecl::AllCharData; |
241 | @@ -1011,7 +1018,7 @@ |
242 | |
243 | const XMLCh *typeURI = NULL; |
244 | |
245 | - if(fValidate) |
246 | + if(fValidate || theXsiType) |
247 | { |
248 | if (theProcessorStipulatedTypeName && theParentStack == 0) |
249 | { |
250 | @@ -1051,7 +1058,7 @@ |
251 | |
252 | const XMLCh *typeName = NULL; |
253 | |
254 | - if(fValidate) |
255 | + if(fValidate || theXsiType) |
256 | { |
257 | //cout << " - getTypeQName: theElemDepth:" << theElemDepth << "\n"; |
258 | if (theProcessorStipulatedTypeName && theElemDepth == 0 ) |
259 | @@ -1582,7 +1589,7 @@ |
260 | } |
261 | } |
262 | |
263 | - //std::cout << "SchemaValidatorFilter::error " << XMLString::transcode(exc_msg.getRawBuffer()) << std::endl; |
264 | + //std::cout << "SchemaValidatorFilter::error " << XMLString::transcode(exc_msg.getRawBuffer()) << std::endl; std::cout.flush(); |
265 | throw XQUERY_EXCEPTION( |
266 | err::XQDY0027, |
267 | ERROR_PARAMS( StrX(exc_msg.getRawBuffer()).localForm() ), |
268 | |
269 | === modified file 'src/types/schema/XercSchemaValidator.cpp' |
270 | --- src/types/schema/XercSchemaValidator.cpp 2012-11-26 23:23:13 +0000 |
271 | +++ src/types/schema/XercSchemaValidator.cpp 2013-02-08 23:12:24 +0000 |
272 | @@ -91,6 +91,7 @@ |
273 | { |
274 | fTrailingSeenNonWhiteSpace.flags = 0; |
275 | fTypeStack = new (fMemoryManager) ValueStackOf<ComplexTypeInfo*>(8, fMemoryManager); |
276 | + //std::cout << " xsv - : constructor \n"; std::cout.flush(); |
277 | } |
278 | |
279 | XercSchemaValidator::~XercSchemaValidator() |
280 | @@ -129,6 +130,7 @@ |
281 | } |
282 | |
283 | ComplexTypeInfo* currType = fTypeStack->pop(); |
284 | + //std::cout << " xsv - : checkcontent pop \n"; std::cout.flush(); |
285 | |
286 | const SchemaElementDecl::ModelTypes modelType = (currType) |
287 | ? (SchemaElementDecl::ModelTypes)(currType->getContentType()) |
288 | @@ -370,6 +372,8 @@ |
289 | fTrailingSeenNonWhiteSpace.flags = 0; |
290 | fSeenId = false; |
291 | fTypeStack->removeAllElements(); |
292 | + //std::cout << " xsv - : reset \n"; std::cout.flush(); |
293 | + |
294 | delete fXsiType; |
295 | fXsiType = 0; |
296 | fCurrentDatatypeValidator = 0; |
297 | @@ -560,6 +564,7 @@ |
298 | { |
299 | ComplexTypeInfo* elemTypeInfo = ((SchemaElementDecl*)elemDef)->getComplexTypeInfo(); |
300 | fTypeStack->push(elemTypeInfo); |
301 | + //std::cout << " xsv - : valElem1 push eti " << (elemTypeInfo ? StrX(elemTypeInfo->getTypeLocalName()).localForm() : "_") << "\n"; std::cout.flush(); |
302 | fCurrentDatatypeValidator = (elemTypeInfo) |
303 | ? elemTypeInfo->getDatatypeValidator() |
304 | : ((SchemaElementDecl*)elemDef)->getDatatypeValidator(); |
305 | @@ -580,7 +585,7 @@ |
306 | |
307 | // retrieve Grammar for the uri |
308 | const XMLCh* uriStr = getScanner()->getURIText(uri); |
309 | - //std::cout << " xsv: fXsiType: " << zorba::StrX(localPart) << " @ " << zorba::StrX(uriStr) << "\n"; std::cout.flush(); |
310 | + //std::cout << " xsv - : valElem2 fXsiType: " << zorba::StrX(localPart) << " @ " << zorba::StrX(uriStr) << "\n"; std::cout.flush(); |
311 | SchemaGrammar* sGrammar = (SchemaGrammar*) fGrammarResolver->getGrammar(uriStr); |
312 | if (!sGrammar) { |
313 | |
314 | @@ -691,7 +696,9 @@ |
315 | if (!fErrorOccurred) |
316 | { |
317 | fTypeStack->pop(); |
318 | + //std::cout << " xsv - : valElem2 pop \n"; std::cout.flush(); |
319 | fTypeStack->push(typeInfo); |
320 | + //std::cout << " xsv - : valElem3 push " << (typeInfo ? StrX(typeInfo->getTypeLocalName()).localForm() : "_") << "\n"; std::cout.flush(); |
321 | fCurrentDatatypeValidator = typeInfo->getDatatypeValidator(); |
322 | } |
323 | } |
324 | @@ -863,6 +870,7 @@ |
325 | { |
326 | fTypeStack->push(typeInfo); |
327 | fCurrentDatatypeValidator = typeInfo->getDatatypeValidator(); |
328 | + //std::cout << " xsv - : valElem4 push " << (typeInfo ? StrX(typeInfo->getTypeLocalName()).localForm() : "_") << "\n"; std::cout.flush(); |
329 | } |
330 | } |
331 | } |
332 | |
333 | === modified file 'src/types/schema/XercSchemaValidator.h' |
334 | --- src/types/schema/XercSchemaValidator.h 2012-09-19 21:16:15 +0000 |
335 | +++ src/types/schema/XercSchemaValidator.h 2013-02-08 23:12:24 +0000 |
336 | @@ -1,12 +1,12 @@ |
337 | /* |
338 | * Copyright 2006-2008 The FLWOR Foundation. |
339 | - * |
340 | + * |
341 | * Licensed under the Apache License, Version 2.0 (the "License"); |
342 | * you may not use this file except in compliance with the License. |
343 | * You may obtain a copy of the License at |
344 | - * |
345 | + * |
346 | * http://www.apache.org/licenses/LICENSE-2.0 |
347 | - * |
348 | + * |
349 | * Unless required by applicable law or agreed to in writing, software |
350 | * distributed under the License is distributed on an "AS IS" BASIS, |
351 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
352 | @@ -114,7 +114,7 @@ |
353 | DatatypeValidator* fCurrentDatatypeValidator; |
354 | XMLBuffer* fNotationBuf; |
355 | XMLBuffer fDatatypeBuffer; |
356 | - |
357 | + |
358 | #if _XERCES_VERSION >= 30000 |
359 | // Only for 3.0.1. |
360 | // |
361 | @@ -158,7 +158,7 @@ |
362 | XMLElementDecl* const elemDecl, |
363 | XERCES_CPP_NAMESPACE::QName** const children, |
364 | const unsigned int childCount); |
365 | -#endif |
366 | +#endif |
367 | |
368 | virtual void faultInAttr( |
369 | XMLAttr& toFill, |
370 | @@ -194,7 +194,7 @@ |
371 | // Virtual DTD handler interface. |
372 | // ----------------------------------------------------------------------- |
373 | virtual bool handlesDTD() const; |
374 | - |
375 | + |
376 | // ----------------------------------------------------------------------- |
377 | // Virtual Schema handler interface. handlesSchema() always return false. |
378 | // ----------------------------------------------------------------------- |
379 | @@ -394,12 +394,12 @@ |
380 | |
381 | ContentSpecNode* getNonUnaryGroup(ContentSpecNode* const pNode); |
382 | }; |
383 | - |
384 | - |
385 | + |
386 | + |
387 | // --------------------------------------------------------------------------- |
388 | // XercSchemaValidator: Setter methods |
389 | // --------------------------------------------------------------------------- |
390 | -inline void XercSchemaValidator::setGrammarResolver(GrammarResolver* grammarResolver) |
391 | +inline void XercSchemaValidator::setGrammarResolver(GrammarResolver* grammarResolver) |
392 | { |
393 | fGrammarResolver = grammarResolver; |
394 | } |
395 | @@ -413,16 +413,17 @@ |
396 | delete fXsiType; |
397 | fXsiType = new (fMemoryManager) |
398 | XERCES_CPP_NAMESPACE::QName(prefix, localPart, uriId, fMemoryManager); |
399 | + //std::cout << " xsv::setXsiType " << StrX(prefix) << ":" << StrX(localPart) << " " << uriId << "\n"; std::cout.flush(); |
400 | } |
401 | |
402 | |
403 | -inline void XercSchemaValidator::setNillable(bool isNil) |
404 | +inline void XercSchemaValidator::setNillable(bool isNil) |
405 | { |
406 | fNil = isNil; |
407 | } |
408 | |
409 | |
410 | -inline void XercSchemaValidator::setExitOnFirstFatal(const bool newValue) |
411 | +inline void XercSchemaValidator::setExitOnFirstFatal(const bool newValue) |
412 | { |
413 | fSchemaErrorReporter.setExitOnFirstFatal(newValue); |
414 | } |
415 | @@ -443,7 +444,7 @@ |
416 | // --------------------------------------------------------------------------- |
417 | // XercSchemaValidator: Getter methods |
418 | // --------------------------------------------------------------------------- |
419 | -inline ComplexTypeInfo* XercSchemaValidator::getCurrentTypeInfo() const |
420 | +inline ComplexTypeInfo* XercSchemaValidator::getCurrentTypeInfo() const |
421 | { |
422 | if (fTypeStack->empty()) |
423 | return 0; |
424 | @@ -467,19 +468,19 @@ |
425 | // --------------------------------------------------------------------------- |
426 | // Virtual interface |
427 | // --------------------------------------------------------------------------- |
428 | -inline Grammar* XercSchemaValidator::getGrammar() const |
429 | +inline Grammar* XercSchemaValidator::getGrammar() const |
430 | { |
431 | return fSchemaGrammar; |
432 | } |
433 | |
434 | |
435 | -inline void XercSchemaValidator::setGrammar(Grammar* aGrammar) |
436 | +inline void XercSchemaValidator::setGrammar(Grammar* aGrammar) |
437 | { |
438 | fSchemaGrammar = (SchemaGrammar*) aGrammar; |
439 | } |
440 | |
441 | |
442 | -inline void XercSchemaValidator::setErrorReporter(XMLErrorReporter* const errorReporter) |
443 | +inline void XercSchemaValidator::setErrorReporter(XMLErrorReporter* const errorReporter) |
444 | { |
445 | XMLValidator::setErrorReporter(errorReporter); |
446 | fSchemaErrorReporter.setErrorReporter(errorReporter); |
447 | @@ -512,7 +513,7 @@ |
448 | const int min1, |
449 | const int max1, |
450 | const int min2, |
451 | - const int max2) |
452 | + const int max2) |
453 | { |
454 | if (min1 >= min2 && |
455 | (max2 == SchemaSymbols::XSD_UNBOUNDED || |
456 | |
457 | === added file 'test/rbkt/ExpQueryResults/zorba/schemas/val-laxXsiType.xml.res' |
458 | --- test/rbkt/ExpQueryResults/zorba/schemas/val-laxXsiType.xml.res 1970-01-01 00:00:00 +0000 |
459 | +++ test/rbkt/ExpQueryResults/zorba/schemas/val-laxXsiType.xml.res 2013-02-08 23:12:24 +0000 |
460 | @@ -0,0 +1,2 @@ |
461 | +<?xml version="1.0" encoding="UTF-8"?> |
462 | +xs:long xs:integer xs:untypedAtomic |
463 | |
464 | === added file 'test/rbkt/Queries/zorba/schemas/val-laxXsiType.xq' |
465 | --- test/rbkt/Queries/zorba/schemas/val-laxXsiType.xq 1970-01-01 00:00:00 +0000 |
466 | +++ test/rbkt/Queries/zorba/schemas/val-laxXsiType.xq 2013-02-08 23:12:24 +0000 |
467 | @@ -0,0 +1,18 @@ |
468 | +import module namespace schema = "http://www.zorba-xquery.com/modules/schema"; |
469 | + |
470 | +declare variable $doc := |
471 | +<numbers xmlns:xs="http://www.w3.org/2001/XMLSchema" |
472 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
473 | +<xs_long xsi:type="xs:long">1</xs_long> |
474 | +<xs_long xsi:type="xs:integer">2</xs_long> |
475 | +<xs_long>3</xs_long> |
476 | +</numbers> |
477 | +; |
478 | + |
479 | +declare variable $vdoc := validate lax { $doc }; |
480 | + |
481 | +( |
482 | +schema:schema-type(fn:data(($vdoc//xs_long)[1])), |
483 | +schema:schema-type(fn:data(($vdoc//xs_long)[2])), |
484 | +schema:schema-type(fn:data(($vdoc//xs_long)[3])) |
485 | +) |
Validation queue starting for merge proposal. zorbatest. lambda. nu:8080/ remotequeue/ bug1023362- xsiTypeIgnored- 2013-02- 01T20-56- 35.809Z/ log.html
Log at: http://