當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。