本文整理汇总了Java中org.apache.xerces.impl.Constants.XERCES_PROPERTY_PREFIX属性的典型用法代码示例。如果您正苦于以下问题:Java Constants.XERCES_PROPERTY_PREFIX属性的具体用法?Java Constants.XERCES_PROPERTY_PREFIX怎么用?Java Constants.XERCES_PROPERTY_PREFIX使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.xerces.impl.Constants
的用法示例。
在下文中一共展示了Constants.XERCES_PROPERTY_PREFIX属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseXMLSchema
SchemaGrammar parseXMLSchema(XMLInputSource is)
throws IOException {
XMLEntityResolver resolver = getEntityResolver();
if(resolver != null) {
fSchemaLoader.setEntityResolver(resolver);
}
if (fErrorReporter.getMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN) == null) {
fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
}
fSchemaLoader.setProperty(ERROR_REPORTER, fErrorReporter);
String propPrefix = Constants.XERCES_PROPERTY_PREFIX;
String propName = propPrefix + Constants.SCHEMA_LOCATION;
fSchemaLoader.setProperty(propName, getProperty(propName));
propName = propPrefix + Constants.SCHEMA_NONS_LOCATION;
fSchemaLoader.setProperty(propName, getProperty(propName));
propName = Constants.JAXP_PROPERTY_PREFIX+Constants.SCHEMA_SOURCE;
fSchemaLoader.setProperty(propName, getProperty(propName));
fSchemaLoader.setFeature(SCHEMA_FULL_CHECKING, getFeature(SCHEMA_FULL_CHECKING));
// Should check whether the grammar with this namespace is already in
// the grammar resolver. But since we don't know the target namespace
// of the document here, we leave such check to XSDHandler
SchemaGrammar grammar = (SchemaGrammar)fSchemaLoader.loadGrammar(is);
// by default, hand it off to the grammar pool
if (grammar != null) {
fGrammarPool.cacheGrammars(XMLGrammarDescription.XML_SCHEMA,
new Grammar[]{grammar});
}
return grammar;
}
示例2: setProperty
/**
* <p>
* Sets the value of a property. This method is called by the component
* manager any time after reset when a property changes value.
* </p>
* <strong>Note:</strong> Components should silently ignore properties
* that do not affect the operation of the component.
*
* @param propertyId The property identifier.
* @param value The value of the property.
*
* @throws XMLConfigurationException Thrown for configuration error.
* In general, components should
* only throw this exception if
* it is <strong>really</strong>
* a critical error.
*/
public void setProperty(String propertyId, Object value)
throws XMLConfigurationException {
// Error reporter
if (propertyId == Constants.XERCES_PROPERTY_PREFIX
+ Constants.ERROR_REPORTER_PROPERTY) {
if (value != null) {
fXPointerErrorReporter = (XMLErrorReporter) value;
} else {
fXPointerErrorReporter = null;
}
}
// Error handler
if (propertyId == Constants.XERCES_PROPERTY_PREFIX
+ Constants.ERROR_HANDLER_PROPERTY) {
if (value != null) {
fErrorHandler = (XMLErrorHandler) value;
} else {
fErrorHandler = null;
}
}
// xml:lang
if (propertyId == Constants.XERCES_FEATURE_PREFIX
+ Constants.XINCLUDE_FIXUP_LANGUAGE_FEATURE) {
if (value != null) {
fFixupLang = ((Boolean)value).booleanValue();
} else {
fFixupLang = false;
}
}
// xml:base
if (propertyId == Constants.XERCES_FEATURE_PREFIX
+ Constants.XINCLUDE_FIXUP_BASE_URIS_FEATURE) {
if (value != null) {
fFixupBase = ((Boolean)value).booleanValue();
} else {
fFixupBase = false;
}
}
//
if (propertyId == Constants.XERCES_PROPERTY_PREFIX
+ Constants.NAMESPACE_CONTEXT_PROPERTY) {
fNamespaceContext = (XIncludeNamespaceSupport) value;
}
super.setProperty(propertyId, value);
}