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


Java XSAttributeUse类代码示例

本文整理汇总了Java中mf.org.apache.xerces.xs.XSAttributeUse的典型用法代码示例。如果您正苦于以下问题:Java XSAttributeUse类的具体用法?Java XSAttributeUse怎么用?Java XSAttributeUse使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


XSAttributeUse类属于mf.org.apache.xerces.xs包,在下文中一共展示了XSAttributeUse类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: expandRelatedAttributeUsesComponents

import mf.org.apache.xerces.xs.XSAttributeUse; //导入依赖的package包/类
private void expandRelatedAttributeUsesComponents(XSObjectList attrUses, Vector componentList,
        String namespace, Hashtable dependencies) {
    final int attrUseSize = (attrUses == null) ? 0 : attrUses.size();
    for (int i=0; i<attrUseSize; i++) {
        expandRelatedAttributeUseComponents((XSAttributeUse)attrUses.item(i), componentList, namespace, dependencies);
    }
}
 
开发者ID:MaTriXy,项目名称:xerces-for-android,代码行数:8,代码来源:XSDHandler.java

示例2: replaceAttributeUse

import mf.org.apache.xerces.xs.XSAttributeUse; //导入依赖的package包/类
public void replaceAttributeUse(XSAttributeUse oldUse, XSAttributeUseImpl newUse) {
    for (int i=0; i<fAttrUseNum; i++) {
        if (fAttributeUses[i] == oldUse) {
            fAttributeUses[i] = newUse;
        }
    }
}
 
开发者ID:MaTriXy,项目名称:xerces-for-android,代码行数:8,代码来源:XSAttributeGroupDecl.java

示例3: getAttributeUse

import mf.org.apache.xerces.xs.XSAttributeUse; //导入依赖的package包/类
public XSAttributeUse getAttributeUse(String namespace, String name) {
    for (int i=0; i<fAttrUseNum; i++) {
        if ( (fAttributeUses[i].fAttrDecl.fTargetNamespace == namespace) &&
             (fAttributeUses[i].fAttrDecl.fName == name) )
            return fAttributeUses[i];
    }

    return null;
}
 
开发者ID:MaTriXy,项目名称:xerces-for-android,代码行数:10,代码来源:XSAttributeGroupDecl.java

示例4: getAttributeUseNoProhibited

import mf.org.apache.xerces.xs.XSAttributeUse; //导入依赖的package包/类
public XSAttributeUse getAttributeUseNoProhibited(String namespace, String name) {
    for (int i=0; i<fAttrUseNum; i++) {
        if ( (fAttributeUses[i].fAttrDecl.fTargetNamespace == namespace) &&
             (fAttributeUses[i].fAttrDecl.fName == name) &&
             (fAttributeUses[i].fUse != SchemaSymbols.USE_PROHIBITED))
            return fAttributeUses[i];
    }

    return null;
}
 
开发者ID:MaTriXy,项目名称:xerces-for-android,代码行数:11,代码来源:XSAttributeGroupDecl.java

示例5: expandRelatedAttributeUseComponents

import mf.org.apache.xerces.xs.XSAttributeUse; //导入依赖的package包/类
private void expandRelatedAttributeUseComponents(XSAttributeUse component, Vector componentList,
        String namespace, Hashtable dependencies) {
    addRelatedAttribute(component.getAttrDeclaration(), componentList, namespace, dependencies);
}
 
开发者ID:MaTriXy,项目名称:xerces-for-android,代码行数:5,代码来源:XSDHandler.java

示例6: mergeAttributes

import mf.org.apache.xerces.xs.XSAttributeUse; //导入依赖的package包/类
private void mergeAttributes(XSAttributeGroupDecl fromAttrGrp,
        XSAttributeGroupDecl toAttrGrp,
        String typeName,
        boolean extension,
        Element elem)
throws ComplexTypeRecoverableError {
    
    XSObjectList attrUseS = fromAttrGrp.getAttributeUses();
    XSAttributeUseImpl oneAttrUse = null;
    int attrCount = attrUseS.getLength();
    for (int i=0; i<attrCount; i++) {
        oneAttrUse = (XSAttributeUseImpl)attrUseS.item(i);
        XSAttributeUse existingAttrUse = toAttrGrp.getAttributeUse(oneAttrUse.fAttrDecl.getNamespace(),
                oneAttrUse.fAttrDecl.getName());
        if (existingAttrUse == null) {
            
            String idName = toAttrGrp.addAttributeUse(oneAttrUse);
            if (idName != null) {
                throw new ComplexTypeRecoverableError("ct-props-correct.5",
                        new Object[]{typeName, idName, oneAttrUse.fAttrDecl.getName()},
                        elem);
            }
        }
        else if (existingAttrUse != oneAttrUse) {
            if (extension) {
                reportSchemaError("ct-props-correct.4",
                        new Object[]{typeName, oneAttrUse.fAttrDecl.getName()},
                        elem);
                // Recover by using the attribute use from the base type,
                // to make the resulting schema "more valid".
                toAttrGrp.replaceAttributeUse(existingAttrUse, oneAttrUse);
            }
        }
    }
    // For extension, the wildcard must be formed by doing a union of the wildcards
    if (extension) {
        if (toAttrGrp.fAttributeWC==null) {
            toAttrGrp.fAttributeWC = fromAttrGrp.fAttributeWC;
        }
        else if (fromAttrGrp.fAttributeWC != null) {
            toAttrGrp.fAttributeWC = toAttrGrp.fAttributeWC.performUnionWith(fromAttrGrp.fAttributeWC, toAttrGrp.fAttributeWC.fProcessContents);
            if (toAttrGrp.fAttributeWC == null) {
                // REVISIT: XML Schema 1.0 2nd edition doesn't actually specify this constraint. It's a bug in the spec
                // which will eventually be fixed. We're just guessing what the error code will be. If it turns out to be
                // something else we'll need to change it. -- mrglavas
                throw new ComplexTypeRecoverableError("src-ct.5", new Object[]{typeName}, elem);
            }
        }
        
    }
}
 
开发者ID:MaTriXy,项目名称:xerces-for-android,代码行数:52,代码来源:XSDComplexTypeTraverser.java

示例7: getAttributeUse

import mf.org.apache.xerces.xs.XSAttributeUse; //导入依赖的package包/类
public XSAttributeUse getAttributeUse(String namespace, String name) {
     return fAttrGrp.getAttributeUse(namespace, name);
}
 
开发者ID:MaTriXy,项目名称:xerces-for-android,代码行数:4,代码来源:XSComplexTypeDecl.java


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