Qt 4.8
Public Types | Static Public Functions | Private Functions | List of all members
QPatternist::Validate Class Reference

Handles XQuery 1.0's validate expression. More...

#include <qvalidate_p.h>

Public Types

enum  Mode { Lax = 1, Strict }
 

Static Public Functions

static Expression::Ptr create (const Expression::Ptr &operandNode, const Mode validationMode, const StaticContext::Ptr &context)
 

Private Functions

 Validate ()
 

Detailed Description

Handles XQuery 1.0's validate expression.

This class is currently not used. The Schema Validation Feature is not supported.

See also
XQuery 1.0: An XML Query Language, 3.13 Validate Expressions
XQuery 1.0: An XML Query Language, 5.2.2 Schema Validation Feature
Author
Frans Englich frans.nosp@m..eng.nosp@m.lich@.nosp@m.noki.nosp@m.a.com

Definition at line 75 of file qvalidate_p.h.

Enumerations

◆ Mode

Represents the validation mode.

Enumerator
Lax 
Strict 

Definition at line 82 of file qvalidate_p.h.

Constructors and Destructors

◆ Validate()

QPatternist::Validate::Validate ( )
private

Functions

◆ create()

Expression::Ptr Validate::create ( const Expression::Ptr operandNode,
const Mode  validationMode,
const StaticContext::Ptr context 
)
static

Creates the necessary Expression instances that validates the operand node operandNode in mode validationMode, and returns it.

Definition at line 53 of file qvalidate.cpp.

56 {
57  Q_ASSERT(operandNode);
58  Q_ASSERT(validationMode == Lax || validationMode == Strict);
59  Q_ASSERT(context);
60  Q_UNUSED(validationMode);
61  Q_UNUSED(context);
62 
63  ItemType::List tList;
66 
67  const SequenceType::Ptr elementOrDocument(makeGenericSequenceType(ItemType::Ptr(new MultiItemType(tList)),
69 
70 
71  return TypeChecker::applyFunctionConversion(operandNode,
72  elementOrDocument,
73  context,
75 }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
Represents multiple types such as document() or xs:integer.
static const ItemType::Ptr document
static Expression::Ptr applyFunctionConversion(const Expression::Ptr &operand, const SequenceType::Ptr &reqType, const StaticContext::Ptr &context, const ReportContext::ErrorCode code=ReportContext::XPTY0004, const Options=Options(AutomaticallyConvert|CheckFocus))
Builds a pipeline of artificial AST nodes that ensures operand conforms to the type reqType by applyi...
static Cardinality exactlyOne()
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729
static const ItemType::Ptr element
The QList class is a template class that provides lists.
Definition: qdatastream.h:62

The documentation for this class was generated from the following files: