本文整理汇总了Java中com.sun.org.apache.xerces.internal.util.XMLChar.trim方法的典型用法代码示例。如果您正苦于以下问题:Java XMLChar.trim方法的具体用法?Java XMLChar.trim怎么用?Java XMLChar.trim使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.org.apache.xerces.internal.util.XMLChar
的用法示例。
在下文中一共展示了XMLChar.trim方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getXsiNil
import com.sun.org.apache.xerces.internal.util.XMLChar; //导入方法依赖的package包/类
boolean getXsiNil(QName element, String xsiNil) {
// Element Locally Valid (Element)
// 3 The appropriate case among the following must be true:
// 3.1 If {nillable} is false, then there must be no attribute information item among the element information item's [attributes] whose [namespace name] is identical to http://www.w3.org/2001/XMLSchema-instance and whose [local name] is nil.
if (fCurrentElemDecl != null && !fCurrentElemDecl.getNillable()) {
reportSchemaError(
"cvc-elt.3.1",
new Object[] {
element.rawname,
SchemaSymbols.URI_XSI + "," + SchemaSymbols.XSI_NIL });
}
// 3.2 If {nillable} is true and there is such an attribute information item and its actual value is true , then all of the following must be true:
// 3.2.2 There must be no fixed {value constraint}.
else {
String value = XMLChar.trim(xsiNil);
if (value.equals(SchemaSymbols.ATTVAL_TRUE)
|| value.equals(SchemaSymbols.ATTVAL_TRUE_1)) {
if (fCurrentElemDecl != null
&& fCurrentElemDecl.getConstraintType() == XSConstants.VC_FIXED) {
reportSchemaError(
"cvc-elt.3.2.2",
new Object[] {
element.rawname,
SchemaSymbols.URI_XSI + "," + SchemaSymbols.XSI_NIL });
}
return true;
}
}
return false;
}