void (final @NotNull XmlTag tag, @NotNull ValidationHost host) { if (!isFromSchemaNs(tag)) return; if (tag.getAttributeValue(REF_ATTR_NAME) == null && tag.getAttributeValue(NAME_ATTR_NAME) == null) { host.addMessage( tag, XmlPsiBundle.message("xml.schema.validation.name.or.ref.should.present"), ValidationHost.ErrorType.ERROR ); } if (tag.getAttributeValue(DEFAULT_ATTR_NAME) != null && tag.getAttributeValue(FIXED_ATTR_NAME) != null) { host.addMessage( tag.getAttribute(DEFAULT_ATTR_NAME, null).getNameElement(), XmlPsiBundle.message("xml.schema.validation.default.or.fixed.should.be.specified.but.not.both"), ValidationHost.ErrorType.ERROR ); host.addMessage( tag.getAttribute(FIXED_ATTR_NAME, null).getNameElement(), XmlPsiBundle.message("xml.schema.validation.default.or.fixed.should.be.specified.but.not.both"), ValidationHost.ErrorType.ERROR ); } }