本文整理汇总了Java中com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg.JAXP_INVALID_ATTR_ERR属性的典型用法代码示例。如果您正苦于以下问题:Java ErrorMsg.JAXP_INVALID_ATTR_ERR属性的具体用法?Java ErrorMsg.JAXP_INVALID_ATTR_ERR怎么用?Java ErrorMsg.JAXP_INVALID_ATTR_ERR使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg
的用法示例。
在下文中一共展示了ErrorMsg.JAXP_INVALID_ATTR_ERR属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAttribute
/**
* javax.xml.transform.sax.TransformerFactory implementation.
* Returns the value set for a TransformerFactory attribute
*
* @param name The attribute name
* @return An object representing the attribute value
* @throws IllegalArgumentException
*/
@Override
public Object getAttribute(String name)
throws IllegalArgumentException
{
// Return value for attribute 'translet-name'
if (name.equals(TRANSLET_NAME)) {
return _transletName;
}
else if (name.equals(GENERATE_TRANSLET)) {
return new Boolean(_generateTranslet);
}
else if (name.equals(AUTO_TRANSLET)) {
return new Boolean(_autoTranslet);
}
else if (name.equals(ENABLE_INLINING)) {
if (_enableInlining)
return Boolean.TRUE;
else
return Boolean.FALSE;
} else if (name.equals(XalanConstants.SECURITY_MANAGER)) {
return _xmlSecurityManager;
} else if (name.equals(XalanConstants.JDK_EXTENSION_CLASSLOADER)) {
return _extensionClassLoader;
}
/** Check to see if the property is managed by the security manager **/
String propertyValue = (_xmlSecurityManager != null) ?
_xmlSecurityManager.getLimitAsString(name) : null;
if (propertyValue != null) {
return propertyValue;
} else {
propertyValue = (_xmlSecurityPropertyMgr != null) ?
_xmlSecurityPropertyMgr.getValue(name) : null;
if (propertyValue != null) {
return propertyValue;
}
}
// Throw an exception for all other attributes
ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_INVALID_ATTR_ERR, name);
throw new IllegalArgumentException(err.toString());
}
示例2: getAttribute
/**
* javax.xml.transform.sax.TransformerFactory implementation.
* Returns the value set for a TransformerFactory attribute
*
* @param name The attribute name
* @return An object representing the attribute value
* @throws IllegalArgumentException
*/
@Override
public Object getAttribute(String name)
throws IllegalArgumentException
{
// Return value for attribute 'translet-name'
if (name.equals(TRANSLET_NAME)) {
return _transletName;
}
else if (name.equals(GENERATE_TRANSLET)) {
return _generateTranslet;
}
else if (name.equals(AUTO_TRANSLET)) {
return _autoTranslet;
}
else if (name.equals(ENABLE_INLINING)) {
if (_enableInlining)
return Boolean.TRUE;
else
return Boolean.FALSE;
} else if (name.equals(XalanConstants.SECURITY_MANAGER)) {
return _xmlSecurityManager;
} else if (name.equals(XalanConstants.JDK_EXTENSION_CLASSLOADER)) {
return _extensionClassLoader;
} else if (JdkXmlUtils.CATALOG_FILES.equals(name)) {
return _catalogFiles;
} else if (JdkXmlUtils.CATALOG_DEFER.equals(name)) {
return _catalogDefer;
} else if (JdkXmlUtils.CATALOG_PREFER.equals(name)) {
return _catalogPrefer;
} else if (JdkXmlUtils.CATALOG_RESOLVE.equals(name)) {
return _catalogResolve;
} else if (JdkXmlFeatures.CATALOG_FEATURES.equals(name)) {
return buildCatalogFeatures();
} else if (JdkXmlUtils.CDATA_CHUNK_SIZE.equals(name)) {
return _cdataChunkSize;
}
/** Check to see if the property is managed by the security manager **/
String propertyValue = (_xmlSecurityManager != null) ?
_xmlSecurityManager.getLimitAsString(name) : null;
if (propertyValue != null) {
return propertyValue;
} else {
propertyValue = (_xmlSecurityPropertyMgr != null) ?
_xmlSecurityPropertyMgr.getValue(name) : null;
if (propertyValue != null) {
return propertyValue;
}
}
// Throw an exception for all other attributes
ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_INVALID_ATTR_ERR, name);
throw new IllegalArgumentException(err.toString());
}