annotation = traverseAnnotationDecl(child, attrValues, false, schemaDoc); child = DOMUtil.getNextSiblingElement(child); String text = DOMUtil.getSyntheticAnnotation(attrDecl); if (text != null) { annotation = traverseSyntheticAnnotation(attrDecl, text, attrValues, false, schemaDoc); reportSchemaError("src-attribute.3.2", new Object[]{refAtt.rawname}, child); attribute = traverseNamedAttr(attrDecl, attrValues, schemaDoc, grammar, false, enclosingParent); reportSchemaError("src-attribute.1", new Object[]{nameAtt}, attrDecl); reportSchemaError("src-attribute.2", new Object[]{nameAtt}, attrDecl); reportSchemaError("src-attribute.5", new Object[]{nameAtt}, attrDecl); fValidationState.setDatatypeXMLVersion(schemaDoc.fDatatypeXMLVersion); try { checkDefaultValid(attrUse); reportSchemaError (ide.getKey(), ide.getArgs(), attrDecl); reportSchemaError ("a-props-correct.2", new Object[]{nameAtt, defaultAtt}, attrDecl); reportSchemaError ("a-props-correct.3", new Object[]{nameAtt}, attrDecl); if (attrUse.fConstraintType != XSConstants.VC_FIXED || !EqualityHelper.isEqual(attrUse.fAttrDecl.getValInfo(), attrUse.fDefault, fSchemaHandler.fSchemaVersion)) { reportSchemaError ("au-props-correct.2", new Object[]{nameAtt, attrUse.fAttrDecl.getValInfo().stringValue()}, attrDecl);
XSAnnotationImpl annotation = null; if (child != null && DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) { annotation = traverseAnnotationDecl(child, attrValues, false, schemaDoc); child = DOMUtil.getNextSiblingElement(child); String text = DOMUtil.getSyntheticAnnotation(attrDecl); if (text != null) { annotation = traverseSyntheticAnnotation(attrDecl, text, attrValues, false, schemaDoc); reportSchemaError("src-resolve", new Object[]{typeAtt.rawname, "simpleType definition"}, attrDecl); if (type == null) { attribute.fUnresolvedTypeName = typeAtt; reportSchemaError("s4s-att-must-appear", new Object[]{SchemaSymbols.ELT_ATTRIBUTE, SchemaSymbols.ATT_NAME}, attrDecl); else reportSchemaError("src-attribute.3.1", null, attrDecl); nameAtt = NO_NAME; reportSchemaError("s4s-elt-must-match.1", new Object[]{nameAtt, "(annotation?, (simpleType?))", DOMUtil.getLocalName(child)}, child); reportSchemaError("src-attribute.1", new Object[]{nameAtt}, attrDecl); reportSchemaError( "src-attribute.4", new Object[]{nameAtt}, attrDecl); checkNotationType(nameAtt, attrType, attrDecl); reportSchemaError ("src-attribute.6.2", new Object[] {nameAtt}, attrDecl); reportSchemaError ("src-attribute.6.3.1", new Object[] {nameAtt}, attrDecl);
fAttributeChecker.reset(fSymbolTable); fAttributeGroupTraverser.reset(fSymbolTable, fValidateAnnotations, locale); fAttributeTraverser.reset(fSymbolTable, fValidateAnnotations, locale); fComplexTypeTraverser.reset(fSymbolTable, fValidateAnnotations, locale); fElementTraverser.reset(fSymbolTable, fValidateAnnotations, locale);
retObj = fAttributeTraverser.traverseGlobal(decl, schemaDoc, grammar); break; case ELEMENT_TYPE :
protected XSAttributeDecl traverseGlobal(Element attrDecl, XSDocumentInfo schemaDoc, SchemaGrammar grammar) { // General Attribute Checking Object[] attrValues = fAttrChecker.checkAttributes(attrDecl, true, schemaDoc); XSAttributeDecl attribute = traverseNamedAttr(attrDecl, attrValues, schemaDoc, grammar, true, null); fAttrChecker.returnAttrArray(attrValues, schemaDoc); return attribute; }
private void createTraversers() { fAttributeChecker = new XSAttributeChecker(this); fAttributeGroupTraverser = new XSDAttributeGroupTraverser(this, fAttributeChecker); fAttributeTraverser = new XSDAttributeTraverser(this, fAttributeChecker); fComplexTypeTraverser = new XSDComplexTypeTraverser(this, fAttributeChecker); fElementTraverser = new XSDElementTraverser(this, fAttributeChecker); fGroupTraverser = new XSDGroupTraverser(this, fAttributeChecker); fKeyrefTraverser = new XSDKeyrefTraverser(this, fAttributeChecker); fNotationTraverser = new XSDNotationTraverser(this, fAttributeChecker); fSimpleTypeTraverser = new XSDSimpleTypeTraverser(this, fAttributeChecker); fUniqueOrKeyTraverser = new XSDUniqueOrKeyTraverser(this, fAttributeChecker); fWildCardTraverser = new XSDWildcardTraverser(this, fAttributeChecker); } // createTraversers()
childName = DOMUtil.getLocalName(child); if (childName.equals(SchemaSymbols.ELT_ATTRIBUTE)) { tempAttrUse = fSchemaHandler.fAttributeTraverser.traverseLocal(child, schemaDoc, grammar,
fAttributeTraverser.traverseGlobal(globalComp, currSchemaDoc, currSG);