PhoenixmlDb.Core
SchemaValidator
Validates an instance document against a , with one result shape whoever asks.
#SchemaValidator
Namespace: PhoenixmlDb.Core.Schema
Validates an instance document against a
, with one result shape whoever asks.
Any number of validations may run against one compiled schema at once.
The instance is read with no document type declaration allowed and nothing resolved. What the instance says about its own schema is not followed: xsi:schemaLocation, xsi:noNamespaceSchemaLocation and a schema written inline in the instance are ignored. The schema validated against is the one passed in.
A match of a pattern facet takes no longer than the schema's CompiledSchema.PatternMatchTimeout. A schema compiled without one has no limit: a pattern that backtracks catastrophically on a value then takes as long as that value makes it. A host that validates against schemas or instances it does not trust sets SchemaCompileOptions.PatternMatchTimeout.
#Methods
#Validate(PhoenixmlDb.Core.Schema.CompiledSchema,IO.Stream,Uri,PhoenixmlDb.Core.Schema.SchemaValidationOptions,Threading.CancellationToken)
#Validate(PhoenixmlDb.Core.Schema.CompiledSchema,IO.TextReader,Uri,PhoenixmlDb.Core.Schema.SchemaValidationOptions,Threading.CancellationToken)
#Validate(PhoenixmlDb.Core.Schema.CompiledSchema,String,Uri,PhoenixmlDb.Core.Schema.SchemaValidationOptions,Threading.CancellationToken)
Validates the document in
.
Parameters:
-
schema— The schema to validate against. -
instance— The document text. -
sourceUri— What to call the document in diagnostics; null when it has no name. -
options—SchemaValidationOptions.Defaultwhen null. -
cancellationToken— Looked at between nodes.
Exceptions:
-
OperationCanceledException— The token was cancelled.