当前位置: 首页>>代码示例>>Java>>正文


Java XSConstants.SCOPE_GLOBAL属性代码示例

本文整理汇总了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;
}
 
开发者ID:MaTriXy,项目名称:xerces-for-android,代码行数:30,代码来源:SubstitutionGroupHandler.java

示例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);
    }
}
 
开发者ID:MaTriXy,项目名称:xerces-for-android,代码行数:12,代码来源:XSDHandler.java

示例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);
    }
}
 
开发者ID:MaTriXy,项目名称:xerces-for-android,代码行数:12,代码来源:XSDHandler.java

示例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);
}
 
开发者ID:MaTriXy,项目名称:xerces-for-android,代码行数:31,代码来源:XSConstraints.java


注:本文中的mf.org.apache.xerces.xs.XSConstants.SCOPE_GLOBAL属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。