本文整理汇总了Java中com.thaiopensource.validate.rng.CompactSchemaReader类的典型用法代码示例。如果您正苦于以下问题:Java CompactSchemaReader类的具体用法?Java CompactSchemaReader怎么用?Java CompactSchemaReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CompactSchemaReader类属于com.thaiopensource.validate.rng包,在下文中一共展示了CompactSchemaReader类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createChildSchema
import com.thaiopensource.validate.rng.CompactSchemaReader; //导入依赖的package包/类
Schema createChildSchema(SAXSource source, String schemaType, PropertyMap options, boolean isAttributesSchema) throws IOException, IncorrectSchemaException, SAXException {
SchemaReader reader = isRnc(schemaType) ? CompactSchemaReader.getInstance() : autoSchemaReader;
PropertyMapBuilder builder = new PropertyMapBuilder(properties);
if (isAttributesSchema)
builder.put(WrapProperty.ATTRIBUTE_OWNER, ValidatorImpl.OWNER_NAME);
builder.add(options);
return reader.createSchema(source, builder.toPropertyMap());
}
开发者ID:relaxng,项目名称:jing-trang,代码行数:9,代码来源:SchemaReceiverImpl.java
示例2: getOption
import com.thaiopensource.validate.rng.CompactSchemaReader; //导入依赖的package包/类
/**
* Get an option for the given URI.
* @param uri The URI for an option.
* @return Either the option from the auto schema reader or
* from the compact schema reader.
*/
Option getOption(String uri) {
Option option = autoSchemaReader.getOption(uri);
if (option != null)
return option;
return CompactSchemaReader.getInstance().getOption(uri);
}
开发者ID:relaxng,项目名称:jing-trang,代码行数:13,代码来源:SchemaReceiverImpl.java
示例3: getOption
import com.thaiopensource.validate.rng.CompactSchemaReader; //导入依赖的package包/类
Option getOption(String uri) {
Option option = autoSchemaReader.getOption(uri);
if (option != null)
return option;
return CompactSchemaReader.getInstance().getOption(uri);
}
开发者ID:relaxng,项目名称:jing-trang,代码行数:7,代码来源:SchemaReceiverImpl.java
示例4: createChildSchema
import com.thaiopensource.validate.rng.CompactSchemaReader; //导入依赖的package包/类
Schema createChildSchema(InputSource inputSource, String schemaType, boolean isAttributesSchema) throws IOException, IncorrectSchemaException, SAXException {
SchemaReader lang = isRnc(schemaType) ? CompactSchemaReader.getInstance() : autoSchemaLanguage;
return lang.createSchema(inputSource,
isAttributesSchema ? attributeSchemaProperties : properties);
}
开发者ID:relaxng,项目名称:jing-trang,代码行数:6,代码来源:SchemaReceiverImpl.java
示例5: ValidationEngine
import com.thaiopensource.validate.rng.CompactSchemaReader; //导入依赖的package包/类
/**
* Constructs a <code>ValidationEngine</code>.
*
* @param xrc the <code>XMLReaderCreator</code> to be used for constructing <code>XMLReader</code>s;
* if <code>null</code> uses <code>Sax2XMLReaderCreator</code>
* @param eh the <code>ErrorHandler</code> to be used for reporting errors; if <code>null</code>
* uses <code>DraconianErrorHandler</code>
* @param flags bitwise OR of flags selected from <code>CHECK_ID_IDREF</code>, <code>COMPACT_SYNTAX</code>,
* <code>FEASIBLE</code>, <code>MNS</code>
* @see com.thaiopensource.xml.sax.DraconianErrorHandler
* @see com.thaiopensource.xml.sax.Sax2XMLReaderCreator
* @see #CHECK_ID_IDREF
* @see #COMPACT_SYNTAX
* @see #FEASIBLE
*/
public ValidationEngine(XMLReaderCreator xrc,
ErrorHandler eh,
int flags) {
super(makePropertyMap(xrc, eh, flags),
(flags & COMPACT_SYNTAX) == 0 ? null : CompactSchemaReader.getInstance());
}
开发者ID:relaxng,项目名称:jing-trang,代码行数:22,代码来源:ValidationEngine.java
示例6: createChildSchema
import com.thaiopensource.validate.rng.CompactSchemaReader; //导入依赖的package包/类
/**
* Creates a child schema. This schema is referred in a validate action.
*
* @param source the SAXSource for the schema.
* @param schemaType the schema type.
* @param options options specified for this schema in the NVDL script.
* @param isAttributesSchema flag indicating if the schema should be modified
* to check attributes only.
* @return
* @throws IOException In case of IO problems.
* @throws IncorrectSchemaException In case of invalid schema.
* @throws SAXException In case if XML problems while creating the schema.
*/
Schema createChildSchema(SAXSource source, String schemaType, PropertyMap options, boolean isAttributesSchema) throws IOException, IncorrectSchemaException, SAXException {
SchemaReader reader = isRnc(schemaType) ? CompactSchemaReader.getInstance() : autoSchemaReader;
PropertyMapBuilder builder = new PropertyMapBuilder(properties);
if (isAttributesSchema)
builder.put(WrapProperty.ATTRIBUTE_OWNER, ValidatorImpl.OWNER_NAME);
builder.add(options);
return reader.createSchema(source, builder.toPropertyMap());
}
开发者ID:relaxng,项目名称:jing-trang,代码行数:22,代码来源:SchemaReceiverImpl.java
示例7: SchemaValidator
import com.thaiopensource.validate.rng.CompactSchemaReader; //导入依赖的package包/类
/**
* Initializes the validator by using the given file as schema file
*
* @param schemaFile schema file
* @throws IOException if it is not possible to read schema files
*/
SchemaValidator(File schemaFile, DeployLogger deployLogger) throws IOException, SAXException {
this.deployLogger = deployLogger;
this.driver = new ValidationDriver(PropertyMap.EMPTY, instanceProperties(), CompactSchemaReader.getInstance());
driver.loadSchema(ValidationDriver.fileInputSource(schemaFile));
}
开发者ID:vespa-engine,项目名称:vespa,代码行数:12,代码来源:SchemaValidator.java
示例8: createSchema
import com.thaiopensource.validate.rng.CompactSchemaReader; //导入依赖的package包/类
/**
* Creates a schema by parsing an XML document. A non-null <code>XMLReaderCreator</code> must be specified
* with <code>setXMLReaderCreator</code> before calling <code>createSchema</code>. The <code>ErrorHandler</code>
* is allowed to be <code>null</code>. The <code>DatatypeLibraryFactory</code> is allowed to be <code>null</code>.
*
* <p>Normally, if a schema cannot be created, <code>createSchema</code> will throw
* a <code>IncorrectSchemaException</code>; however,
* before doing so, one or more errors will be reported using the <code>ErrorHandler</code> if it is non-null. If the
* <code>ErrorHandler</code> throws a <code>SAXException</code>, then <code>createSchema</code> will pass this
* through rather than throwing a <code>IncorrectSchemaException</code>. Similarly, if <code>XMLReader.parse</code>
* throws a <code>SAXException</code> or <code>IOException</code>, then <code>createSchema</code> will pass
* this through rather than throwing a <code>IncorrectSchemaException</code>. Thus, if an error handler
* is specified that reports errors to the user, there is no need to report any additional message to the
* user if <code>createSchema</code> throws <code>IncorrectSchemaException</code>.
*
* @param in the <code>InputSource</code> containing the XML document to be parsed;
* must not be <code>null</code>
* @return the <code>Schema</code> constructed from the XML document;
* never <code>null</code>.
*
* @throws IOException if an I/O error occurs
* @throws SAXException if there is an XML parsing error and the XMLReader or ErrorHandler
* throws a SAXException
* @throws com.thaiopensource.validate.IncorrectSchemaException if the XML document was not a correct RELAX NG schema
* @throws NullPointerException if the current XMLReaderCreator is <code>null</code>
*/
public Schema createSchema(InputSource in) throws IOException, SAXException, IncorrectSchemaException {
SchemaReader r = compactSyntax ? CompactSchemaReader.getInstance() : autoSchemaLanguage;
return r.createSchema(in, properties.toPropertyMap());
}
开发者ID:relaxng,项目名称:jing-trang,代码行数:31,代码来源:SchemaFactory.java
示例9: setCompactsyntax
import com.thaiopensource.validate.rng.CompactSchemaReader; //导入依赖的package包/类
/**
* Handles the <code>compactsyntax</code> attribute.
*
* @param compactsyntax the attribute value converted to a boolean
*/
public void setCompactsyntax(boolean compactsyntax) {
schemaReader = compactsyntax ? CompactSchemaReader.getInstance() : null;
}
开发者ID:relaxng,项目名称:jing-trang,代码行数:9,代码来源:JingTask.java
注:本文中的com.thaiopensource.validate.rng.CompactSchemaReader类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论