5#include <xml/xml_char_type.h>
6#include <xml/schema/xml_schema_validation_flags.h>
7#include <xml/schema/validation_event_handler.h>
8#include <system/multicast_delegate.h>
9#include <system/exceptions.h>
10#include <system/enum_helpers.h>
11#include <system/array.h>
22template <
typename,
typename>
class Dictionary;
23template <
typename>
class List;
33class DocumentSchemaValidator;
37class IXmlNamespaceResolver;
45class SchemaElementDecl;
48enum class ValidatorState;
51class XmlSchemaAttribute;
54class XmlSchemaDatatype;
55class XmlSchemaElement;
59class XmlSchemaParticle;
61class XmlSchemaSimpleType;
67class XmlQualifiedName;
70class XsdValidatingReader;
97 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
98 ASPOSECPP_SHARED_RTTI_INFO_DECL();
107 friend class System::Xml::XsdValidatingReader;
108 friend class System::Xml::DocumentSchemaValidator;
109 friend class BaseValidator;
110 friend class DtdValidator;
111 friend class XdrValidator;
112 friend class XsdValidator;
316 bool get_ProcessIdentityConstraints();
317 bool get_ReportValidationWarnings();
318 bool get_ProcessSchemaHints();
322 String GetConcatenatedValue();
324 void RecompileSchemaSet();
325 String GetDefaultAttributePrefix(
const String& attributeNS);
339 #ifdef ASPOSE_GET_SHARED_MEMBERS
340 ASPOSECPP_SHARED_API
void GetSharedMembers(System::Object::shared_members_type& result)
const override;
348 int32_t _startIDConstraint;
349 static const int32_t STACK_INCREMENT;
359 ValidatorState _currentState;
386 String _xsiSchemaLocationString;
387 String _xsiNoNamespaceSchemaLocationString;
391 static const String Quote;
397 bool get_StrictlyAssessed();
398 bool get_HasSchema();
399 bool get_HasIdentityConstraints();
408 void ProcessSchemaLocations(
const String& xsiSchemaLocation,
const String& xsiNoNamespaceSchemaLocation);
420 void ThrowDeclNotFoundWarningOrError(
bool declFound);
421 void CheckElementProperties();
422 void ValidateStartElementIdentityConstraints();
424 void AddXmlNamespaceSchema();
431 void CheckForwardRefs();
432 void CheckStateTransition(ValidatorState toState,
const String& methodName);
436 void AddIdentityConstraints();
437 void ElementIdentityConstraints();
440 static void BuildXsiAttributes();
443 void ProcessEntity(
const String& name);
444 void SendValidationEvent(
const String& code);
446 void SendValidationEvent(
const String& code,
const String& arg);
455 static struct __StaticConstructor__ { __StaticConstructor__(); } s_constructor__;
List forward declaration.
Definition: list.h:127
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
Subclass of System::SmartPtr which sets itself to weak mode at construction. Please note that this cl...
Definition: weak_ptr.h:18
Represents an XML Schema Definition Language (XSD) Schema validation engine. The XmlSchemaValidator c...
Definition: xml_schema_validator.h:93
void ValidateText(const String &elementValue)
Validates whether the text string specified is allowed in the current element context,...
SharedPtr< IXmlLineInfo > get_LineInfoProvider()
Returns the line number information for the XML node being validated.
SharedPtr< Object > ValidateAttribute(const String &localName, const String &namespaceUri, const String &attributeValue, const SharedPtr< XmlSchemaInfo > &schemaInfo)
Validates the attribute name, namespace URI, and value in the current element context.
SharedPtr< Object > get_ValidationEventSender()
Returns the object sent as the sender object of a validation event.
virtual ~XmlSchemaValidator()
XmlSchemaValidator(const SharedPtr< XmlNameTable > &nameTable, const SharedPtr< XmlSchemaSet > &schemas, const SharedPtr< IXmlNamespaceResolver > &namespaceResolver, XmlSchemaValidationFlags validationFlags)
Initializes a new instance of the XmlSchemaValidator class.
void set_SourceUri(const SharedPtr< Uri > &value)
Sets the source URI for the XML node being validated.
SharedPtr< Object > ValidateEndElement(const SharedPtr< XmlSchemaInfo > &schemaInfo)
Verifies if the text content of the element is valid according to its data type for elements with sim...
void ValidateWhitespace(const String &elementValue)
Validates whether the white space in the string specified is allowed in the current element context,...
void ValidateElement(const String &localName, const String &namespaceUri, const SharedPtr< XmlSchemaInfo > &schemaInfo, const String &xsiType, const String &xsiNil, const String &xsiSchemaLocation, const String &xsiNoNamespaceSchemaLocation)
Validates the element in the current context with the xsi:Type, xsi:Nil, xsi:SchemaLocation,...
void AddSchema(const SharedPtr< XmlSchema > &schema)
Adds an XML Schema Definition Language (XSD) schema to the set of schemas used for validation.
void ValidateText(XmlValueGetter elementValue)
Validates whether the text returned by the XmlValueGetter object specified is allowed in the current ...
void EndValidation()
Ends validation and checks identity constraints for the entire XML document.
void ValidateElement(const String &localName, const String &namespaceUri, const SharedPtr< XmlSchemaInfo > &schemaInfo)
Validates the element in the current context.
void set_LineInfoProvider(const SharedPtr< IXmlLineInfo > &value)
Sets the line number information for the XML node being validated.
SharedPtr< Uri > get_SourceUri()
Returns the source URI for the XML node being validated.
void set_XmlResolver(const SharedPtr< System::Xml::XmlResolver > &value)
Sets the XmlResolver object used to resolve xs:import and xs:include elements as well as xsi:schemaLo...
void ValidateEndOfAttributes(const SharedPtr< XmlSchemaInfo > &schemaInfo)
Verifies whether all the required attributes in the element context are present and prepares the XmlS...
void GetUnspecifiedDefaultAttributes(const SharedPtr< Collections::Generic::List< SharedPtr< Object > > > &defaultAttributes)
Validates identity constraints on the default attributes and populates the List specified with XmlSch...
void Initialize()
Initializes the state of the XmlSchemaValidator object.
void set_ValidationEventSender(const SharedPtr< Object > &value)
Sets the object sent as the sender object of a validation event.
System::Xml::Schema::ValidationEventHandler ValidationEventHandler
The ValidationEventHandler that receives schema validation warnings and errors encountered during sch...
Definition: xml_schema_validator.h:118
ArrayPtr< SharedPtr< XmlSchemaAttribute > > GetExpectedAttributes()
Returns the expected attributes for the current element context.
void SkipToEndElement(const SharedPtr< XmlSchemaInfo > &schemaInfo)
Skips validation of the current element content and prepares the XmlSchemaValidator object to validat...
SharedPtr< Object > ValidateAttribute(const String &localName, const String &namespaceUri, XmlValueGetter attributeValue, const SharedPtr< XmlSchemaInfo > &schemaInfo)
Validates the attribute name, namespace URI, and value in the current element context.
void Initialize(const SharedPtr< XmlSchemaObject > &partialValidationType)
Initializes the state of the XmlSchemaValidator object using the XmlSchemaObject specified for partia...
void ValidateWhitespace(XmlValueGetter elementValue)
Validates whether the white space returned by the XmlValueGetter object specified is allowed in the c...
ArrayPtr< SharedPtr< XmlSchemaParticle > > GetExpectedParticles()
Returns the expected particles in the current element context.
SharedPtr< Object > ValidateEndElement(const SharedPtr< XmlSchemaInfo > &schemaInfo, const SharedPtr< Object > &typedValue)
Verifies if the text content of the element specified is valid according to its data type.
For internal purposes. Do not use this class directly.
Definition: xml_char_type.h:61
class ASPOSECPP_SHARED_CLASS List
Definition: ienumerable.h:18
@ Text
Defines color adjustment information for text.
System::ExceptionWrapper< Details_XmlSchemaValidationException > XmlSchemaValidationException
Definition: xml_schema_validation_exception.h:36
System::ExceptionWrapper< Details_XmlSchemaException > XmlSchemaException
Definition: xml_schema_exception.h:76
XmlSchemaContentType
Enumerations for the content model of the complex type. This represents the content in the post-schem...
Definition: xml_schema_content_type.h:18
System::MulticastDelegate< void(SharedPtr< Object >, SharedPtr< ValidationEventArgs >)> ValidationEventHandler
Represents the callback method that will handle XML schema validation events and the ValidationEventA...
Definition: validation_event_handler.h:33
System::MulticastDelegate< SharedPtr< Object >()> XmlValueGetter
A callback used by the XmlSchemaValidator class to pass attribute, text,and white space values as a r...
Definition: xml_schema_validator.h:85
XmlSeverityType
Represents the severity of the validation event.
Definition: xml_severity_type.h:17
XmlSchemaContentProcessing
Provides information about the validation mode of any and anyAttribute element replacements.
Definition: xml_schema_content_processing.h:17
XmlSchemaValidationFlags
Specifies schema validation options used by the XmlSchemaValidator and XmlReader classes.
Definition: xml_schema_validation_flags.h:18
@ Schema
Validate according to XML Schema definition language (XSD) schemas, including inline XML Schemas....
@ Xml
Serialize according to the XML 1.0 rules.
XmlTokenizedType
Represents the XML type for the string. This allows the string to be read as a particular XML type,...
Definition: xml_tokenized_type.h:16
Definition: db_command.h:9