System.Xml.Schema.XmlSchemaAnyAttribute.BuildNamespaceListV1Compat C# (CSharp) Method

BuildNamespaceListV1Compat() private method

private BuildNamespaceListV1Compat ( string targetNamespace ) : void
targetNamespace string
return void
        internal void BuildNamespaceListV1Compat(string targetNamespace) {
            if (ns != null) {
                namespaceList = new NamespaceListV1Compat(ns, targetNamespace);
            }
            else {
                namespaceList = new NamespaceList(); //This is only ##any, hence base class is sufficient
            }
        }

Usage Example

 private void PreprocessAttributes(XmlSchemaObjectCollection attributes, XmlSchemaAnyAttribute anyAttribute, XmlSchemaObject parent) {
     for (int i = 0; i < attributes.Count; ++i) {
         SetParent(attributes[i], parent);
         XmlSchemaAttribute attribute = attributes[i] as XmlSchemaAttribute;
         if (attribute != null) {
             PreprocessLocalAttribute(attribute);
         } 
         else { // XmlSchemaAttributeGroupRef
             XmlSchemaAttributeGroupRef attributeGroupRef = (XmlSchemaAttributeGroupRef)attributes[i];
             if (attributeGroupRef.RefName.IsEmpty) {
                 SendValidationEvent(Res.Sch_MissAttribute, "ref", attributeGroupRef);
             }
             else {
                 ValidateQNameAttribute(attributeGroupRef, "ref", attributeGroupRef.RefName);
             }
             PreprocessAnnotation(attributes[i]); //set parent of annotation child of attributeGroupRef
             ValidateIdAttribute(attributes[i]);
         }
     }
     if (anyAttribute != null) {
         try {
             SetParent(anyAttribute, parent);
             PreprocessAnnotation(anyAttribute); //set parent of annotation child of any attribute
             anyAttribute.BuildNamespaceListV1Compat(this.targetNamespace);
         } 
         catch {
             SendValidationEvent(Res.Sch_InvalidAnyAttribute, anyAttribute);
         }
         ValidateIdAttribute(anyAttribute);
     }
 }
All Usage Examples Of System.Xml.Schema.XmlSchemaAnyAttribute::BuildNamespaceListV1Compat