本文整理汇总了Java中com.sun.org.apache.xerces.internal.impl.xs.SubstitutionGroupHandler.getMatchingElemDecl方法的典型用法代码示例。如果您正苦于以下问题:Java SubstitutionGroupHandler.getMatchingElemDecl方法的具体用法?Java SubstitutionGroupHandler.getMatchingElemDecl怎么用?Java SubstitutionGroupHandler.getMatchingElemDecl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.org.apache.xerces.internal.impl.xs.SubstitutionGroupHandler
的用法示例。
在下文中一共展示了SubstitutionGroupHandler.getMatchingElemDecl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findMatchingDecl
import com.sun.org.apache.xerces.internal.impl.xs.SubstitutionGroupHandler; //导入方法依赖的package包/类
Object findMatchingDecl(QName curElem, SubstitutionGroupHandler subGroupHandler) {
Object matchingDecl = null;
for (int elemIndex = 0; elemIndex < fElemMapSize; elemIndex++) {
int type = fElemMapType[elemIndex] ;
if (type == XSParticleDecl.PARTICLE_ELEMENT) {
matchingDecl = subGroupHandler.getMatchingElemDecl(curElem, (XSElementDecl)fElemMap[elemIndex]);
if (matchingDecl != null) {
return matchingDecl;
}
}
else if (type == XSParticleDecl.PARTICLE_WILDCARD) {
if(((XSWildcardDecl)fElemMap[elemIndex]).allowNamespace(curElem.uri))
return fElemMap[elemIndex];
}
}
return null;
}
示例2: findMatchingDecl
import com.sun.org.apache.xerces.internal.impl.xs.SubstitutionGroupHandler; //导入方法依赖的package包/类
Object findMatchingDecl(QName elementName, SubstitutionGroupHandler subGroupHandler) {
Object matchingDecl = null;
for (int i = 0; i < fNumElements; i++) {
matchingDecl = subGroupHandler.getMatchingElemDecl(elementName, fAllElements[i]);
if (matchingDecl != null)
break;
}
return matchingDecl;
}
示例3: oneTransition
import com.sun.org.apache.xerces.internal.impl.xs.SubstitutionGroupHandler; //导入方法依赖的package包/类
/**
* The method corresponds to one transition in the content model.
*
* @param elementName
* @param currentState Current state
* @return an element decl object
*/
public Object oneTransition (QName elementName, int[] currentState, SubstitutionGroupHandler subGroupHandler) {
// error state
if (currentState[0] < 0) {
currentState[0] = XSCMValidator.SUBSEQUENT_ERROR;
return findMatchingDecl(elementName, subGroupHandler);
}
// seen child
currentState[0] = STATE_CHILD;
Object matchingDecl = null;
for (int i = 0; i < fNumElements; i++) {
// we only try to look for a matching decl if we have not seen
// this element yet.
if (currentState[i+1] != STATE_START)
continue;
matchingDecl = subGroupHandler.getMatchingElemDecl(elementName, fAllElements[i]);
if (matchingDecl != null) {
// found the decl, mark this element as "seen".
currentState[i+1] = STATE_VALID;
return matchingDecl;
}
}
// couldn't find the decl, change to error state.
currentState[0] = XSCMValidator.FIRST_ERROR;
return findMatchingDecl(elementName, subGroupHandler);
}