XSDAttributeGroupTraverser.java revision 286
/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* The attribute group definition schema component traverser.
*
* <attributeGroup
* id = ID
* name = NCName
* ref = QName
* {any attributes with non-schema namespace . . .}>
* Content: (annotation?, ((attribute | attributeGroup)*, anyAttribute?))
* </attributeGroup>
*
* @xerces.internal
*
* @author Rahul Srivastava, Sun Microsystems Inc.
* @author Sandy Gao, IBM
*
* @version $Id: XSDAttributeGroupTraverser.java,v 1.7 2010-11-01 04:40:02 joehw Exp $
*/
class XSDAttributeGroupTraverser extends XSDAbstractTraverser {
super(handler, gAttrCheck);
}
// General Attribute Checking for elmNode declared locally
// get attribute
// ref should be here.
return null;
}
// get global decl
attrGrp = (XSAttributeGroupDecl)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.ATTRIBUTEGROUP_TYPE, refAttr, elmNode);
// no children are allowed here except annotation, which is optional.
} else {
}
}
}
} // if
return attrGrp;
} // traverseLocal
// General Attribute Checking for elmNode declared globally
// global declaration must have a name
}
// check the content
}
else {
}
}
// Traverse the attribute and attribute group elements and fill in the
// attributeGroup structure
// An invalid element was found...
Object[] args = new Object [] {nameAttr, "(annotation?, ((attribute | attributeGroup)*, anyAttribute?))", DOMUtil.getLocalName(nextNode)};
}
// if a global group doesn't have a name, then don't add it.
return null;
}
// Remove prohibited attributes from the set
// check for restricted redefine:
XSAttributeGroupDecl redefinedAttrGrp = (XSAttributeGroupDecl)fSchemaHandler.getGrpOrAttrGrpRedefinedByRestriction(
if(redefinedAttrGrp != null) {
reportSchemaError("src-redefine.7.2.2", new Object [] {nameAttr, errArgs[errArgs.length-1]}, child);
}
}
if (annotation != null) {
annotations = new XSObjectListImpl();
} else {
}
// make an entry in global declarations.
}
// also add it to extended map
}
// handle duplicates
}
}
return attrGrp;
} // traverseGlobal
} // XSDAttributeGroupTraverser