~ubuntu-branches/ubuntu/precise/xerces-c/precise-updates

« back to all changes in this revision

Viewing changes to src/xercesc/validators/schema/SchemaValidator.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Jay Berkenbilt
  • Date: 2009-12-05 14:58:32 UTC
  • mfrom: (2.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091205145832-378dg3x72mdzfzup
Tags: 3.1.0~rc1-1
* New upstream release; public release candidate uploaded at request of
  upstream.
* Updated source format to '3.0 (quilt)'

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 */
17
17
 
18
18
/*
19
 
 * $Id: SchemaValidator.hpp 744929 2009-02-16 14:53:58Z borisk $
 
19
 * $Id: SchemaValidator.hpp 806238 2009-08-20 16:19:44Z amassari $
20
20
 */
21
21
 
22
22
#if !defined(XERCESC_INCLUDE_GUARD_SCHEMAVALIDATOR_HPP)
109
109
    // -----------------------------------------------------------------------
110
110
    //  Schema Validator methods
111
111
    // -----------------------------------------------------------------------
112
 
    void normalizeWhiteSpace(DatatypeValidator* dV, const XMLCh* const value, XMLBuffer& toFill);
 
112
    void normalizeWhiteSpace(DatatypeValidator* dV, const XMLCh* const value, XMLBuffer& toFill, bool bStandalone = false);
113
113
 
114
114
    // -----------------------------------------------------------------------
115
115
    //  Setter methods
121
121
       , const unsigned int        uriId);
122
122
 
123
123
    void setNillable(bool isNil);
 
124
    void resetNillable();
124
125
    void setErrorReporter(XMLErrorReporter* const errorReporter);
125
126
    void setExitOnFirstFatal(const bool newValue);
126
127
    void setDatatypeBuffer(const XMLCh* const value);
134
135
    DatatypeValidator *getMostRecentAttrValidator() const;
135
136
    bool getErrorOccurred() const;
136
137
    bool getIsElemSpecified() const;
 
138
    bool getIsXsiTypeSet() const;
137
139
    const XMLCh* getNormalizedValue() const;
138
140
 
139
141
private:
255
257
    //      Store the Schema Type Attribute Value if schema type is specified
256
258
    //
257
259
    //  fNil
 
260
    //      Indicates if a nil value is acceptable
 
261
    //  fNilFound
258
262
    //      Indicates if Nillable has been set
259
263
    // -----------------------------------------------------------------------
260
264
    //  The following used internally in the validator
292
296
    GrammarResolver*                fGrammarResolver;
293
297
    QName*                          fXsiType;
294
298
    bool                            fNil;
 
299
    bool                            fNilFound;
295
300
    DatatypeValidator*              fCurrentDatatypeValidator;
296
301
    XMLBuffer*                      fNotationBuf;
297
302
    XMLBuffer                       fDatatypeBuffer;
298
 
    // Only for 3.0.1.
299
 
    //
300
 
    union
301
 
    {
302
 
      bool old;
303
 
      unsigned char flags; // fTrailing - big 0; fSeenNonWhiteSpace - bit 1
304
 
    } fTrailingSeenNonWhiteSpace;
 
303
    bool                            fTrailing;
 
304
    bool                            fSeenNonWhiteSpace;
305
305
    bool                            fSeenId;
306
306
    XSDErrorReporter                fSchemaErrorReporter;
307
307
    ValueStackOf<ComplexTypeInfo*>* fTypeStack;
328
328
 
329
329
inline void SchemaValidator::setNillable(bool isNil) {
330
330
    fNil = isNil;
 
331
    fNilFound = true;
 
332
}
 
333
 
 
334
inline void SchemaValidator::resetNillable() {
 
335
    fNil = false;
 
336
    fNilFound = false;
331
337
}
332
338
 
333
339
inline void SchemaValidator::setExitOnFirstFatal(const bool newValue) {
427
433
    return fDatatypeBuffer.getRawBuffer();
428
434
}
429
435
 
 
436
inline bool SchemaValidator::getIsXsiTypeSet() const
 
437
{
 
438
    return (fXsiType!=0);
 
439
}
 
440
 
430
441
XERCES_CPP_NAMESPACE_END
431
442
 
432
443
#endif