本文整理汇总了Java中mf.org.apache.xerces.xs.XSConstants.SCOPE_GLOBAL属性的典型用法代码示例。如果您正苦于以下问题:Java XSConstants.SCOPE_GLOBAL属性的具体用法?Java XSConstants.SCOPE_GLOBAL怎么用?Java XSConstants.SCOPE_GLOBAL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类mf.org.apache.xerces.xs.XSConstants
的用法示例。
在下文中一共展示了XSConstants.SCOPE_GLOBAL属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMatchingElemDecl
public XSElementDecl getMatchingElemDecl(QName element, XSElementDecl exemplar) {
if (element.localpart == exemplar.fName &&
element.uri == exemplar.fTargetNamespace) {
return exemplar;
}
// if the exemplar is not a global element decl, then it's not possible
// to be substituted by another element.
if (exemplar.fScope != XSConstants.SCOPE_GLOBAL) {
return null;
}
// if the decl blocks substitution, return false
if ((exemplar.fBlock & XSConstants.DERIVATION_SUBSTITUTION) != 0) {
return null;
}
// get the decl for the element
XSElementDecl eDecl = fXSElementDeclHelper.getGlobalElementDecl(element);
if (eDecl == null) {
return null;
}
// and check by using substitutionGroup information
if (substitutionGroupOK(eDecl, exemplar, exemplar.fBlock)) {
return eDecl;
}
return null;
}
示例2: addRelatedElement
private void addRelatedElement(XSElementDeclaration decl, Vector componentList, String namespace, Hashtable dependencies) {
if (decl.getScope() == XSConstants.SCOPE_GLOBAL) {
if (!componentList.contains(decl)) {
Vector importedNamespaces = findDependentNamespaces(namespace, dependencies);
addNamespaceDependency(namespace, decl.getNamespace(), importedNamespaces);
componentList.add(decl);
}
}
else {
expandRelatedElementComponents(decl, componentList, namespace, dependencies);
}
}
示例3: addRelatedAttribute
private void addRelatedAttribute(XSAttributeDeclaration decl, Vector componentList, String namespace, Hashtable dependencies) {
if (decl.getScope() == XSConstants.SCOPE_GLOBAL) {
if (!componentList.contains(decl)) {
Vector importedNamespaces = findDependentNamespaces(namespace, dependencies);
addNamespaceDependency(namespace, decl.getNamespace(), importedNamespaces);
componentList.add(decl);
}
}
else {
expandRelatedAttributeComponents(decl, componentList, namespace, dependencies);
}
}
示例4: checkElementDeclsConsistent
public static void checkElementDeclsConsistent(XSComplexTypeDecl type,
XSParticleDecl particle,
SymbolHash elemDeclHash,
SubstitutionGroupHandler sgHandler)
throws XMLSchemaException {
// check for elements in the tree with the same name and namespace
int pType = particle.fType;
if (pType == XSParticleDecl.PARTICLE_WILDCARD)
return;
if (pType == XSParticleDecl.PARTICLE_ELEMENT) {
XSElementDecl elem = (XSElementDecl)(particle.fValue);
findElemInTable(type, elem, elemDeclHash);
if (elem.fScope == XSConstants.SCOPE_GLOBAL) {
// Check for subsitution groups.
XSElementDecl[] subGroup = sgHandler.getSubstitutionGroup(elem);
for (int i = 0; i < subGroup.length; i++) {
findElemInTable(type, subGroup[i], elemDeclHash);
}
}
return;
}
XSModelGroupImpl group = (XSModelGroupImpl)particle.fValue;
for (int i = 0; i < group.fParticleCount; i++)
checkElementDeclsConsistent(type, group.fParticles[i], elemDeclHash, sgHandler);
}