286N/A * reserved comment block 286N/A * DO NOT REMOVE OR ALTER! 286N/A * Copyright 2001-2004 The Apache Software Foundation. 286N/A * Licensed under the Apache License, Version 2.0 (the "License"); 286N/A * you may not use this file except in compliance with the License. 286N/A * You may obtain a copy of the License at 286N/A * Unless required by applicable law or agreed to in writing, software 286N/A * distributed under the License is distributed on an "AS IS" BASIS, 286N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 286N/A * See the License for the specific language governing permissions and 286N/A * limitations under the License. 286N/A * The XML representation for an attribute group declaration 286N/A * schema component is a global <attributeGroup> element information item 286N/A * @author Sandy Gao, IBM 286N/A * @author Rahul Srivastava, Sun Microsystems Inc. 286N/A // name of the attribute group 286N/A // target namespace of the attribute group 286N/A // number of attribute uses included by this attribute group 286N/A // attribute uses included by this attribute group 286N/A // attribute wildcard included by this attribute group 286N/A // whether there is an attribute use whose type is or is derived from ID. 286N/A // The namespace schema information item corresponding to the target namespace 286N/A // of the attribute group definition, if it is globally declared; or null otherwise. 286N/A // add an attribute use 286N/A // if the type is derived from ID, but there is already another attribute 286N/A // use of type ID, then return the name of the other attribute use; 286N/A // otherwise, return null 286N/A // if this attribute use is prohibited, then don't check whether it's 286N/A // if there is already an attribute use of type ID, 286N/A // return its name (and don't add it to the list, to avoid 286N/A // interruption to instance validation. 286N/A // Remove all prohibited attributes. 286N/A // Do not remove attributes that have the same name as the prohibited 286N/A // ones, because they are specified at the same level. Prohibited 286N/A // attributes are only to remove attributes from the base type in a 286N/A// OUTER: for (int i = 0; i < fAttrUseNum; i++) { 286N/A// if (fAttributeUses[i].fUse == SchemaSymbols.USE_PROHIBITED) 286N/A// for (int j = 1; j <= pCount; j++) { 286N/A// if (fAttributeUses[i].fAttrDecl.fName == pUses[fAttrUseNum-pCount].fAttrDecl.fName && 286N/A// fAttributeUses[i].fAttrDecl.fTargetNamespace == pUses[fAttrUseNum-pCount].fAttrDecl.fTargetNamespace) { 286N/A// pUses[newCount++] = fAttributeUses[i]; 286N/A// fAttributeUses = pUses; 286N/A// fAttrUseNum = newCount; 286N/A * Check that the attributes in this group validly restrict those from a base group. 286N/A * If an error is found, an Object[] is returned. This contains the arguments for the error message 286N/A * describing the error. The last element in the array (at index arr.length - 1) is the the error code. 286N/A * Returns null if there is no error. 286N/A * REVISIT: is there a better way of returning the appropriate information for the error? 286N/A * @param typeName the name of the type containing this attribute group, used for error reporting purposes 286N/A * @param baseGroup the XSAttributeGroupDecl that is the base we are checking against 286N/A // Look for a match in the base 286N/A // derivation-ok-restriction. Constraint 2.1.1 286N/A "derivation-ok-restriction.2.1.1"};
286N/A // if this attribute is prohibited in the derived type, don't 286N/A // need to check any of the following constraints. 286N/A // derivation-ok-restriction. Constraint 2.1.1 286N/A // derivation-ok-restriction. Constraint 2.1.3 286N/A "derivation-ok-restriction.2.1.3.a"};
286N/A // check the values are the same. 286N/A // No matching attribute in base - there should be a matching wildcard 286N/A // derivation-ok-restriction. Constraint 2.2 286N/A "derivation-ok-restriction.2.2.a"};
286N/A "derivation-ok-restriction.2.2.b"};
286N/A // Check that any REQUIRED attributes in the base have matching attributes 286N/A // derivation-ok-restriction. Constraint 3 286N/A // Look for a match in this group 286N/A "derivation-ok-restriction.3"};
286N/A // Now, check wildcards 286N/A // derivation-ok-restriction. Constraint 4 286N/A "derivation-ok-restriction.4.3"};
286N/A // reset the attribute group declaration 286N/A // reset attribute uses 286N/A * Get the type of the object, i.e ELEMENT_DECLARATION. 286N/A * The <code>name</code> of this <code>XSObject</code> depending on the 286N/A * <code>XSObject</code> type. 286N/A * The namespace URI of this node, or <code>null</code> if it is 286N/A * unspecified. defines how a namespace URI is attached to schema 286N/A * {attribute uses} A set of attribute uses. 286N/A * {attribute wildcard} Optional. A wildcard. 286N/A * Optional. Annotation. 286N/A * Optional. Annotations. 286N/A * @see org.apache.xerces.xs.XSObject#getNamespaceItem() 286N/A}
// class XSAttributeGroupDecl