本文整理汇总了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);
}
}
示例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;
}
}
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
}
}
}
示例7: getAttributeUse
import mf.org.apache.xerces.xs.XSAttributeUse; //导入依赖的package包/类
public XSAttributeUse getAttributeUse(String namespace, String name) {
return fAttrGrp.getAttributeUse(namespace, name);
}