XmlSchemaValidationFlags Enumeração
Definição
Especifica as opções de validação de esquema usadas pelas classes XmlSchemaValidator e XmlReader.Specifies schema validation options used by the XmlSchemaValidator and XmlReader classes.
Esta enumeração tem um atributo FlagsAttribute que permite uma combinação bit a bit dos valores membros dela.
public enum class XmlSchemaValidationFlags
[System.Flags]
public enum XmlSchemaValidationFlags
[<System.Flags>]
type XmlSchemaValidationFlags =
Public Enum XmlSchemaValidationFlags
- Herança
- Atributos
Campos
AllowXmlAttributes | 16 | Permite atributos xml:* mesmo quando não estão definidos no esquema.Allow xml:* attributes even if they are not defined in the schema. Os atributos serão validados com base em seu tipo de dados.The attributes will be validated based on their data type. |
None | 0 | Não processe restrições de identidade, esquemas embutidos, dicas de localização de esquema ou avisos de validação de esquema de relatório.Do not process identity constraints, inline schemas, schema location hints, or report schema validation warnings. |
ProcessIdentityConstraints | 8 | Restrições de identidade do processo ( |
ProcessInlineSchema | 1 | Esquemas embutidos do processo encontrados durante a validação.Process inline schemas encountered during validation. |
ProcessSchemaLocation | 2 | Dicas de localização de esquemas do processo ( |
ReportValidationWarnings | 4 | Avisos de validação de esquema de relatório encontrados durante a validação.Report schema validation warnings encountered during validation. |
Exemplos
Para obter um exemplo que usa a XmlSchemaValidationFlags
enumeração, consulte a XmlSchemaValidator classe.For an example that uses the XmlSchemaValidationFlags
enumeration, see the XmlSchemaValidator class.
Comentários
Quando usado com o XmlReader , os XmlSchemaValidationFlags
valores definem as opções de validação usadas por uma validação de esquema XmlReader para executar a validação de XML em um esquema.When used with the XmlReader, XmlSchemaValidationFlags
values define validation options used by a schema validating XmlReader to perform XML validation against a schema. XmlSchemaValidationFlags
os valores de uma validação XmlReader são especificados usando a XmlReaderSettings.ValidationFlags propriedade.XmlSchemaValidationFlags
values for a validating XmlReader are specified using the XmlReaderSettings.ValidationFlags property.
Ao usar o AllowXmlAttributes
valor:When using the AllowXmlAttributes
value:
Quando um esquema não importa o namespace XML.When a schema doesn't import the Xml namespace.
Se
AllowXmlAttributes
for definido comotrue
(padrão) e o documento de instância contiver atributos XML, o mecanismo de validação carregará um instantâneo do esquema de namespace XML padrão e o usará para validação.IfAllowXmlAttributes
is set totrue
(default) and the instance document contains Xml attributes, the validation engine will load a snapshot of the default Xml namespace schema and use it for validation. Se os atributos XML usados no documento de instância não forem encontrados no esquema padrão, o documento não será validado.If Xml attributes used in the instance document are not found in the default schema, the document will not validate.Se
AllowXmlAttributes
for definido comofalse
e o documento de instância contiver atributos XML, o mecanismo de validação relatará um erro.IfAllowXmlAttributes
is set tofalse
and the instance document contains Xml attributes, the validation engine will report an error.
Quando um esquema importa o namespace XML sem um local.When a schema imports the Xml namespace without a location.
Se
AllowXmlAttributes
for definido comotrue
(padrão) e o documento de instância contiver atributos XML, o mecanismo de validação usará o esquema de namespace XML padrão para validação.IfAllowXmlAttributes
is set totrue
(default) and the instance document contains Xml attributes, the validation engine will use the default Xml namespace schema for validation. Se os atributos XML usados no documento de instância não forem encontrados no esquema padrão, o documento não será validado.If Xml attributes used in the instance document are not found in the default schema, the document will not validate.Se
AllowXmlAttributes
é definido comofalse
e o documento de instância contém atributos XML que não são explicitamente permitidos pelo esquema, o mecanismo de validação relatará um erro.IfAllowXmlAttributes
is set tofalse
and the instance document contains Xml attributes that are not explicitly allowed by the schema, the validation engine will report an error.Se
AllowXmlAttributes
é definido comofalse
e o documento de instância contém atributos XML explicitamente permitidos pelo esquema, o mecanismo de validação validará os atributos da mesma forma que valida outros atributos usando o esquema de namespace XML padrão.IfAllowXmlAttributes
is set tofalse
and the instance document contains Xml attributes that are explicitly allowed by the schema, the validation engine will validate the attributes the same way it validates other attributes using the default Xml namespace schema.
Quando um esquema importa um esquema de namespace XML personalizado com um schemaLocation personalizado.When a schema imports a custom Xml namespace schema with a custom schemaLocation.
Se
AllowXmlAttributes
for definido comotrue
(padrão) e o documento de instância contiver atributos XML, o mecanismo de validação usará o esquema de namespace XML personalizado para validação.IfAllowXmlAttributes
is set totrue
(default) and the instance document contains Xml attributes, the validation engine will use the custom Xml namespace schema for validation. Se os atributos XML usados no documento de instância não forem encontrados no esquema especificado, o documento não será validado.If Xml attributes used in the instance document are not found in the specified schema, the document will not validate.Se
AllowXmlAttributes
é definido comofalse
e o documento de instância contém atributos XML que não são explicitamente permitidos pelo esquema, o mecanismo de validação relatará um erro.IfAllowXmlAttributes
is set tofalse
and the instance document contains Xml attributes that are not explicitly allowed by the schema, the validation engine will report an error.Se
AllowXmlAttributes
é definido comofalse
e o documento de instância contém atributos XML explicitamente permitidos pelo esquema, o mecanismo de validação validará os atributos da mesma forma que valida outros atributos usando o esquema de namespace XML especificado.IfAllowXmlAttributes
is set tofalse
and the instance document contains Xml attributes that are explicitly allowed by the schema, the validation engine will validate the attributes the same way it validates other attributes using specified Xml namespace schema.
Quando um esquema define um atributo XML: * com use = "required".When a schema defines an xml:* attribute with use="required".
- O seguinte se aplica quando
AllowXmlAttributes
é definido comotrue
efalse
.The following applies whenAllowXmlAttributes
is set totrue
andfalse
. Atributos XML necessários: * devem ser tratados como outros atributos e validados usando o esquema de namespace XML especificado.Required xml:* attributes should be treated as other attributes and validated using the specified Xml namespace schema.
- O seguinte se aplica quando
Quando um esquema define um atributo XML: * com use = "proibido".When a schema defines an xml:* attribute with use="prohibited".
- O seguinte se aplica quando
AllowXmlAttributes
é definido comotrue
efalse
.The following applies whenAllowXmlAttributes
is set totrue
andfalse
. Se um documento de instância contiver atributos XML: * explicitamente proibidos pelo esquema, o mecanismo de validação relatará um erro.If an instance document contains xml:* attributes that are explicitly prohibited by the schema, the validation engine will report an error.
- O seguinte se aplica quando
Quando um esquema especifica um curinga de atributo.When a schema specifies an attribute wildcard.
Se um documento de instância contiver um atributo XML e o esquema especificar um curinga de atributo com processContents omitido ou definido como "estrito", o mecanismo de validação usará o esquema de namespace XML presente no XmlSchemaSet .If an instance document contains an Xml attribute and the schema specifies an attribute wildcard with processContents either omitted or set to "strict", the validation engine will use the Xml namespace schema present in the XmlSchemaSet. Se nenhum esquema de namespace XML for especificado, o mecanismo de validação se comportará da seguinte maneira.If no Xml namespace schema is specified, the validation engine will behave as follows.
Se
AllowXmlAttributes
for definido comotrue
, o mecanismo de validação usará o esquema de namespace XML padrão para executar a validação.IfAllowXmlAttributes
is set totrue
, the validation engine will use the default Xml namespace schema to perform validation.Se
AllowXmlAttributes
for definido comofalse
, o mecanismo de validação relatará um erro.IfAllowXmlAttributes
is set tofalse
, the validation engine will report an error.Se um documento de instância contiver um atributo XML e o esquema especificar um curinga de atributo com processContents definido como "Skip", o mecanismo de validação ignorará a validação de atributo.If an instance document contains an Xml attribute and the schema specifies an attribute wildcard with processContents set to "skip", the validation engine will skip attribute validation.
Se um documento de instância contiver um atributo XML e o esquema especificar um curinga de atributo com processContents definido como "LAX", o mecanismo de validação usará o esquema de namespace XML presente no XmlSchemaSet .If an instance document contains an Xml attribute and the schema specifies an attribute wildcard with processContents set to "lax", the validation engine will use the Xml namespace schema present in the XmlSchemaSet. Se nenhum esquema de namespace XML for especificado, o mecanismo de validação se comportará da seguinte maneira.If no Xml namespace schema is specified, the validation engine will behave as follows.
Se
AllowXmlAttributes
for definido comotrue
, o mecanismo de validação usará o esquema de namespace XML padrão para executar a validação.IfAllowXmlAttributes
is set totrue
, the validation engine will use the default Xml namespace schema to perform validation.Se
AllowXmlAttributes
for definido comofalse
, a validação de atributo não será executada.IfAllowXmlAttributes
is set tofalse
, attribute validation will not be performed.
Ao validar tipos simples.When validating simple types.
- Quando
AllowXmlAttributes
é definido comotrue
(padrão), os atributos XML serão permitidos em elementos de tipos simples.WhenAllowXmlAttributes
is set totrue
(default), Xml attributes will be allowed on elements of simple types.
- Quando