private void ValidateQNameAttribute(XmlSchemaObject xso, string attributeName, XmlQualifiedName value) {
     try {
         value.Verify();
         value.Atomize(NameTable);
         if(referenceNamespaces[value.Namespace] == null) {
             SendValidationEvent(Res.Sch_UnrefNS,value.Namespace,xso, XmlSeverityType.Warning);
         }
     } 
     catch (Exception ex){
         SendValidationEvent(Res.Sch_InvalidAttribute, attributeName, ex.Message, xso);
     }
 }
 private void ValidateQNameAttribute(XmlSchemaObject xso, string attributeName, XmlQualifiedName value) {
     try {
         value.Verify();
         value.Atomize(NameTable);
         if (currentSchema.IsChameleon && value.Namespace.Length == 0) {
             value.SetNamespace(currentSchema.TargetNamespace); //chameleon schemas are clones that have correct targetNamespace set
         }
         if(referenceNamespaces[value.Namespace] == null) {
             SendValidationEvent(Res.Sch_UnrefNS, value.Namespace, xso, XmlSeverityType.Warning);
         }
     } 
     catch(FormatException fx) {
         SendValidationEvent(Res.Sch_InvalidAttribute, new string[] {attributeName, fx.Message}, fx, xso);
     }
     catch(XmlException ex) {
         SendValidationEvent(Res.Sch_InvalidAttribute, new string[] {attributeName, ex.Message}, ex, xso);
     }
 }
示例#3
0
 private void ValidateQNameAttribute(XmlSchemaObject xso, string attributeName, XmlQualifiedName value) {
     try {
         value.Verify();
         value.Atomize(nameTable);
     } 
     catch (Exception ex){
         SendValidationEvent(Res.Sch_InvalidAttribute, attributeName, ex.Message, xso);
     }
 }