本文整理了Java中org.codehaus.stax2.validation.XMLValidationSchema
类的一些代码示例,展示了XMLValidationSchema
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLValidationSchema
类的具体详情如下:
包路径:org.codehaus.stax2.validation.XMLValidationSchema
类名称:XMLValidationSchema
[英]Defines the API that validator schema instances have to implement. Schema objects are results of parsing of input that defines validation rules; things like DTD files, W3c Schema input documents and so on. Schema instances can not be directly used for validation; they are blueprints for constructing such validator Objects. Because of this, they are also guaranteed to be thread-safe and reusable. One way to think of this is that schemas are actual validator factories instead of XMLValidationSchemaFactory instances.
One note about creation of validator instances: since the validation may be invoked from wide variety of contexts (from parser, from serializer, from processing pipeline etc), the validation context is abstracted as ValidationContext. Instances may make use of additional knowledge about actual implementing classes if they can safely determine the type runtime, but should gracefully handle the cases where the context is created by a caller that is not part of the same StAX implementation as the validator.
[中]
代码示例来源:origin: org.codehaus.woodstox/woodstox-core-asl
public XMLValidator validateAgainst(XMLValidationSchema schema)
throws XMLStreamException
{
/* Should we first check if we maybe already have a validator
* for the schema?
*/
return addValidator(schema.createValidator(this));
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.woodstox
/**
* Returns type of schema that was used to construct this
* validator instance.
*
* @return One of external schema identifier values (such as
* {@link XMLValidationSchema#SCHEMA_ID_DTD}).
*/
public String getSchemaType() {
XMLValidationSchema sch = getSchema();
return (sch == null) ? null : sch.getSchemaType();
}
代码示例来源:origin: woodstox/wstx-asl
/**
* Returns type of schema that was used to construct this
* validator instance.
*
* @return One of external schema identifier values (such as
* {@link XMLValidationSchema#SCHEMA_ID_DTD}).
*/
public String getSchemaType() {
XMLValidationSchema sch = getSchema();
return (sch == null) ? null : sch.getSchemaType();
}
代码示例来源:origin: org.codehaus.woodstox/woodstox-core-asl
public XMLValidator validateAgainst(XMLValidationSchema schema)
throws XMLStreamException
{
XMLValidator vld = schema.createValidator(this);
if (mValidator == null) {
/* Need to enable other validation modes? Structural validation
* should always be done when we have other validators as well,
* as well as attribute uniqueness checks.
*/
mCheckStructure = true;
mCheckAttrs = true;
mValidator = vld;
} else {
mValidator = new ValidatorPair(mValidator, vld);
}
return vld;
}
代码示例来源:origin: woodstox/wstx-lgpl
/**
* Returns type of schema that was used to construct this
* validator instance.
*
* @return One of external schema identifier values (such as
* {@link XMLValidationSchema#SCHEMA_ID_DTD}).
*/
public String getSchemaType() {
XMLValidationSchema sch = getSchema();
return (sch == null) ? null : sch.getSchemaType();
}
代码示例来源:origin: FasterXML/woodstox
public XMLValidator validateAgainst(XMLValidationSchema schema)
throws XMLStreamException
{
/* Should we first check if we maybe already have a validator
* for the schema?
*/
return addValidator(schema.createValidator(this));
}
代码示例来源:origin: Nextdoor/bender
/**
* Returns type of schema that was used to construct this
* validator instance.
*
* @return One of external schema identifier values (such as
* {@link XMLValidationSchema#SCHEMA_ID_DTD}).
*/
public String getSchemaType() {
XMLValidationSchema sch = getSchema();
return (sch == null) ? null : sch.getSchemaType();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.woodstox
public XMLValidator validateAgainst(XMLValidationSchema schema)
throws XMLStreamException
{
/* Should we first check if we maybe already have a validator
* for the schema?
*/
return addValidator(schema.createValidator(this));
}
代码示例来源:origin: woodstox/wstx-lgpl
public XMLValidator validateAgainst(XMLValidationSchema schema)
throws XMLStreamException
{
/* Should we first check if we maybe already have a validator
* for the schema?
*/
return addValidator(schema.createValidator(this));
}
代码示例来源:origin: woodstox/wstx-asl
public XMLValidator validateAgainst(XMLValidationSchema schema)
throws XMLStreamException
{
/* Should we first check if we maybe already have a validator
* for the schema?
*/
return addValidator(schema.createValidator(this));
}
代码示例来源:origin: com.fasterxml.woodstox/woodstox-core
public XMLValidator validateAgainst(XMLValidationSchema schema)
throws XMLStreamException
{
/* Should we first check if we maybe already have a validator
* for the schema?
*/
return addValidator(schema.createValidator(this));
}
代码示例来源:origin: org.codehaus.woodstox/woodstox-core-lgpl
public XMLValidator validateAgainst(XMLValidationSchema schema)
throws XMLStreamException
{
/* Should we first check if we maybe already have a validator
* for the schema?
*/
return addValidator(schema.createValidator(this));
}
代码示例来源:origin: Nextdoor/bender
public XMLValidator validateAgainst(XMLValidationSchema schema)
throws XMLStreamException
{
/* Should we first check if we maybe already have a validator
* for the schema?
*/
return addValidator(schema.createValidator(this));
}
代码示例来源:origin: woodstox/wstx-asl
public XMLValidator validateAgainst(XMLValidationSchema schema)
throws XMLStreamException
{
XMLValidator vld = schema.createValidator(this);
if (mValidator == null) {
/* Need to enable other validation modes? Structural validation
* should always be done when we have other validators as well,
* as well as attribute uniqueness checks.
*/
mCheckStructure = true;
mCheckAttrs = true;
mValidator = vld;
} else {
mValidator = new ValidatorPair(mValidator, vld);
}
return vld;
}
代码示例来源:origin: FasterXML/aalto-xml
@Override
public XMLValidator validateAgainst(XMLValidationSchema schema) throws XMLStreamException
{
XMLValidator vld = schema.createValidator(this);
if (_validator == null) {
/* Need to enable other validation modes? Structural validation
* should always be done when we have other validators as well,
* as well as attribute uniqueness checks.
*/
_cfgCheckStructure = true;
_cfgCheckAttrs = true;
_validator = vld;
} else {
_validator = new ValidatorPair(_validator, vld);
}
return vld;
}
代码示例来源:origin: com.fasterxml.woodstox/woodstox-core
@Override
public XMLValidator validateAgainst(XMLValidationSchema schema)
throws XMLStreamException
{
XMLValidator vld = schema.createValidator(this);
if (mValidator == null) {
/* Need to enable other validation modes? Structural validation
* should always be done when we have other validators as well,
* as well as attribute uniqueness checks.
*/
mCheckStructure = true;
mCheckAttrs = true;
mValidator = vld;
} else {
mValidator = new ValidatorPair(mValidator, vld);
}
return vld;
}
代码示例来源:origin: com.fasterxml/aalto-xml
@Override
public XMLValidator validateAgainst(XMLValidationSchema schema) throws XMLStreamException
{
XMLValidator vld = schema.createValidator(this);
if (_validator == null) {
/* Need to enable other validation modes? Structural validation
* should always be done when we have other validators as well,
* as well as attribute uniqueness checks.
*/
_cfgCheckStructure = true;
_cfgCheckAttrs = true;
_validator = vld;
} else {
_validator = new ValidatorPair(_validator, vld);
}
return vld;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.woodstox
public XMLValidator validateAgainst(XMLValidationSchema schema)
throws XMLStreamException
{
XMLValidator vld = schema.createValidator(this);
if (mValidator == null) {
/* Need to enable other validation modes? Structural validation
* should always be done when we have other validators as well,
* as well as attribute uniqueness checks.
*/
mCheckStructure = true;
mCheckAttrs = true;
mValidator = vld;
} else {
mValidator = new ValidatorPair(mValidator, vld);
}
return vld;
}
代码示例来源:origin: org.codehaus.woodstox/woodstox-core-lgpl
public XMLValidator validateAgainst(XMLValidationSchema schema)
throws XMLStreamException
{
XMLValidator vld = schema.createValidator(this);
if (mValidator == null) {
/* Need to enable other validation modes? Structural validation
* should always be done when we have other validators as well,
* as well as attribute uniqueness checks.
*/
mCheckStructure = true;
mCheckAttrs = true;
mValidator = vld;
} else {
mValidator = new ValidatorPair(mValidator, vld);
}
return vld;
}
代码示例来源:origin: woodstox/wstx-lgpl
public XMLValidator validateAgainst(XMLValidationSchema schema)
throws XMLStreamException
{
XMLValidator vld = schema.createValidator(this);
if (mValidator == null) {
/* Need to enable other validation modes? Structural validation
* should always be done when we have other validators as well,
* as well as attribute uniqueness checks.
*/
mCheckStructure = true;
mCheckAttrs = true;
mValidator = vld;
} else {
mValidator = new ValidatorPair(mValidator, vld);
}
return vld;
}
内容来源于网络,如有侵权,请联系作者删除!