当前位置: 首页>>代码示例>>C#>>正文


C# Schema.XmlSchemaObjectTable类代码示例

本文整理汇总了C#中System.Xml.Schema.XmlSchemaObjectTable的典型用法代码示例。如果您正苦于以下问题:C# XmlSchemaObjectTable类的具体用法?C# XmlSchemaObjectTable怎么用?C# XmlSchemaObjectTable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


XmlSchemaObjectTable类属于System.Xml.Schema命名空间,在下文中一共展示了XmlSchemaObjectTable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddToTable

		public static void AddToTable (XmlSchemaObjectTable table, XmlSchemaObject obj,
			XmlQualifiedName qname, ValidationEventHandler h)
		{
			if (table.Contains (qname)) {
				// FIXME: This logic unexpectedly allows 
				// one redefining item and two or more redefining items.
				// FIXME: redefining item is not simple replacement,
				// but much more complex stuff.
				if (obj.isRedefineChild) {	// take precedence.
					if (obj.redefinedObject != null)
						obj.error (h, String.Format ("Named item {0} was already contained in the schema object table.", qname));
					else
						obj.redefinedObject = table [qname];
					table.Set (qname, obj);
				}
				else if (table [qname].isRedefineChild) {
					if (table [qname].redefinedObject != null)
						obj.error (h, String.Format ("Named item {0} was already contained in the schema object table.", qname));
					else
						table [qname].redefinedObject = obj;
					return;	// never add to the table.
				}
				else if (StrictMsCompliant) {
					table.Set (qname, obj);
				}
				else
					obj.error (h, String.Format ("Named item {0} was already contained in the schema object table. {1}",
					                             qname, "Consider setting MONO_STRICT_MS_COMPLIANT to 'yes' to mimic MS implementation."));
			}
			else
				table.Set (qname, obj);
		}
开发者ID:carrie901,项目名称:mono,代码行数:32,代码来源:XmlSchemaUtil.cs

示例2: XmlSchemaRedefine

		public XmlSchemaRedefine()
		{
			attributeGroups = new XmlSchemaObjectTable();
			groups = new XmlSchemaObjectTable();
			items = new XmlSchemaObjectCollection(this);
			schemaTypes = new XmlSchemaObjectTable();
		}
开发者ID:nobled,项目名称:mono,代码行数:7,代码来源:XmlSchemaRedefine.cs

示例3: AddTableToSchema

        // Adds all items in the XmlSchemaObjectTable to the specified XmlSchema
        //
        private static void AddTableToSchema(XmlSchema outSch, XmlSchemaObjectTable table)
        {
            var e = table.GetEnumerator();

            while (e.MoveNext())
            {
                outSch.Items.Add((XmlSchemaObject)e.Value);
            }
        }
开发者ID:Waltervondehans,项目名称:NBi,代码行数:11,代码来源:XmlSchemaIncludeNormalizer.cs

示例4: Compiler

 public Compiler(XmlNameTable nameTable, ValidationEventHandler eventHandler, XmlSchema schemaForSchema, XmlSchemaCompilationSettings compilationSettings) : base(nameTable, null, eventHandler, compilationSettings)
 {
     this.attributes = new XmlSchemaObjectTable();
     this.attributeGroups = new XmlSchemaObjectTable();
     this.elements = new XmlSchemaObjectTable();
     this.schemaTypes = new XmlSchemaObjectTable();
     this.groups = new XmlSchemaObjectTable();
     this.notations = new XmlSchemaObjectTable();
     this.examplars = new XmlSchemaObjectTable();
     this.identityConstraints = new XmlSchemaObjectTable();
     this.complexTypeStack = new Stack();
     this.schemasToCompile = new Hashtable();
     this.importedSchemas = new Hashtable();
     this.schemaForSchema = schemaForSchema;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:15,代码来源:Compiler.cs

示例5: VerifySchemaValid

 internal override void VerifySchemaValid(XmlSchemaObjectTable notations, XmlSchemaObject caller)
 {
     for (Datatype_NOTATION e_notation = this; e_notation != null; e_notation = (Datatype_NOTATION) e_notation.Base)
     {
         if ((e_notation.Restriction != null) && ((e_notation.Restriction.Flags & RestrictionFlags.Enumeration) != 0))
         {
             for (int i = 0; i < e_notation.Restriction.Enumeration.Count; i++)
             {
                 XmlQualifiedName name = (XmlQualifiedName) e_notation.Restriction.Enumeration[i];
                 if (!notations.Contains(name))
                 {
                     throw new XmlSchemaException("Sch_NotationRequired", caller);
                 }
             }
             return;
         }
     }
     throw new XmlSchemaException("Sch_NotationRequired", caller);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:19,代码来源:Datatype_NOTATION.cs

示例6: DumpAttributes

 private string DumpAttributes(XmlSchemaObjectTable attributeUses, XmlSchemaAnyAttribute attributeWildcard) {
     StringBuilder sb = new StringBuilder();
     sb.Append("[");
     bool first = true;
     foreach (XmlSchemaAttribute attribute in attributeUses.Values) {
         if (attribute.Use != XmlSchemaUse.Prohibited) {
             if (first) {
                 first = false;
             }
             else {
                 sb.Append(" ");
             }
             sb.Append(attribute.QualifiedName.Name);       
             if (attribute.Use == XmlSchemaUse.Optional || attribute.Use == XmlSchemaUse.None) {
                 sb.Append("?");                                                                  
             }
         }
     }
     if (attributeWildcard != null) {
         if (attributeUses.Count != 0) {
             sb.Append(" ");                                                                  
         }
         sb.Append("<");
         sb.Append(attributeWildcard.NamespaceList.ToString());
         sb.Append(">");
     }
     sb.Append("] - [");
     first = true;
     foreach (XmlSchemaAttribute attribute in attributeUses.Values) {
         if (attribute.Use == XmlSchemaUse.Prohibited) {
             if (first) {
                 first = false;
             }
             else {
                 sb.Append(" ");
             }
             sb.Append(attribute.QualifiedName.Name);       
         }
     }
     sb.Append("]");
     return sb.ToString();
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:42,代码来源:SchemaSetCompiler.cs

示例7: XmlSchema

		public XmlSchema ()
		{
			attributeFormDefault= XmlSchemaForm.None;
			blockDefault = XmlSchemaDerivationMethod.None;
			elementFormDefault = XmlSchemaForm.None;
			finalDefault = XmlSchemaDerivationMethod.None;
			includes = new XmlSchemaObjectCollection();
			isCompiled = false;
			items = new XmlSchemaObjectCollection();
			attributeGroups = new XmlSchemaObjectTable();
			attributes = new XmlSchemaObjectTable();
			elements = new XmlSchemaObjectTable();
			groups = new XmlSchemaObjectTable();
			notations = new XmlSchemaObjectTable();
			schemaTypes = new XmlSchemaObjectTable();
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:16,代码来源:XmlSchema.cs

示例8: TraverseAttributes

 private void TraverseAttributes(XmlSchemaObjectTable derivedAttributes, ClrContentTypeInfo typeInfo)
 {
     foreach (XmlSchemaAttribute derivedAttribute in derivedAttributes.Values)
     {
         Debug.Assert(derivedAttribute.AttributeSchemaType != null); //For use=prohibited, without derivation it doesnt mean anything, hence attribute should be compiled
         ClrBasePropertyInfo propertyInfo = BuildProperty(derivedAttribute, false, false);
         BuildAnnotationInformation(propertyInfo, derivedAttribute, false, false);
         typeInfo.AddMember(propertyInfo);
     }
 }
开发者ID:dipdapdop,项目名称:linqtoxsd,代码行数:10,代码来源:XsdToTypesConverter.cs

示例9: GetAttributeFromNS

 private XmlSchemaAttribute GetAttributeFromNS(string ns, bool other, XmlSchemaObjectTable attributes)
 {
     if (other) {
         foreach(XmlSchemaAttribute attr in schemaSet.GlobalAttributes.Values) {
             if (attr.QualifiedName.Namespace != ns && attr.QualifiedName.Namespace != string.Empty && attributes[attr.QualifiedName] == null) {
                 return attr;
             }
         }
     }
     else {
         foreach(XmlSchemaAttribute attr in schemaSet.GlobalAttributes.Values) {
             if (attr.QualifiedName.Namespace == ns && attributes[attr.QualifiedName] == null) {
                 return attr;
             }
         }
     }
     return null;
 }
开发者ID:mildrock,项目名称:dummy,代码行数:18,代码来源:XmlSampleGenerator.cs

示例10: AddAttributes

        private XmlQueryCardinality AddAttributes(List<XmlQueryType> list, XmlSchemaObjectTable attributeUses, XmlSchemaAnyAttribute attributeWildcard, XmlQueryType filter) {
            XmlQueryCardinality card = XmlQueryCardinality.Zero;
            if (attributeWildcard != null) {
                XmlSchemaType attributeSchemaType = attributeWildcard.ProcessContentsCorrect == XmlSchemaContentProcessing.Skip ? DatatypeImplementation.UntypedAtomicType : DatatypeImplementation.AnySimpleType;

                // wildcard will match more then one attribute
                switch (attributeWildcard.NamespaceList.Type) {
                case NamespaceList.ListType.Set:
                    foreach (string ns in attributeWildcard.NamespaceList.Enumerate) {
                        card += AddFilteredPrime(list, CreateAttributeType(ns, false, attributeSchemaType), filter);
                    }
                    break;
                case NamespaceList.ListType.Other:
                    card += AddFilteredPrime(list, CreateAttributeType(attributeWildcard.NamespaceList.Excluded, true, attributeSchemaType), filter);
                    break;
                case NamespaceList.ListType.Any:
                default:
                    card +=  AddFilteredPrime(list, attributeWildcard.ProcessContentsCorrect == XmlSchemaContentProcessing.Skip ? UntypedAttribute : Attribute, filter);
                    break;
                }
                // Always optional
                card *= XmlQueryCardinality.ZeroOrOne;
            }
            foreach (XmlSchemaAttribute attribute in attributeUses.Values) {
                XmlQueryCardinality cardAttr = AddFilteredPrime(list, CreateAttributeType(attribute), filter);
                if (cardAttr != XmlQueryCardinality.Zero) {
                    Debug.Assert(cardAttr == XmlQueryCardinality.ZeroOrOne || cardAttr == XmlQueryCardinality.One);
                    card += (attribute.Use == XmlSchemaUse.Optional ? XmlQueryCardinality.ZeroOrOne : cardAttr);
                }
            }
            return card;
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:32,代码来源:XmlQueryTypeFactory.cs

示例11: SchemaCollectionCompiler

 public SchemaCollectionCompiler(XmlNameTable nameTable, ValidationEventHandler eventHandler) : base(nameTable, null, eventHandler)
 {
     this.examplars = new XmlSchemaObjectTable();
     this.complexTypeStack = new Stack();
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:5,代码来源:SchemaCollectionCompiler.cs

示例12: ValidateUniqueTypeAttribution

		internal override void ValidateUniqueTypeAttribution (XmlSchemaObjectTable labels,
			ValidationEventHandler h, XmlSchema schema)
		{
			if (TargetGroup != null)
				TargetGroup.Particle.ValidateUniqueTypeAttribution (labels, h, schema);
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:6,代码来源:XmlSchemaGroupRef.cs

示例13: XSOEnumerator

 internal XSOEnumerator(List<XmlSchemaObjectTable.XmlSchemaObjectEntry> entries, int size, XmlSchemaObjectTable.EnumeratorType enumType)
 {
     this.entries = entries;
     this.size = size;
     this.enumType = enumType;
     this.currentIndex = -1;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:XmlSchemaObjectTable.cs

示例14: VerifySchemaValid

        internal override void VerifySchemaValid(XmlSchemaObjectTable notations, XmlSchemaObject caller) {

            // Only datatypes that are derived from NOTATION by specifying a value for enumeration can be used in a schema.
            // Furthermore, the value of all enumeration facets must match the name of a notation declared in the current schema.                    //
            for(Datatype_NOTATION dt = this; dt != null; dt = (Datatype_NOTATION)dt.Base) {
                if (dt.Restriction != null && (dt.Restriction.Flags & RestrictionFlags.Enumeration) != 0) {
                    for (int i = 0; i < dt.Restriction.Enumeration.Count; ++i) {
                        XmlQualifiedName notation = (XmlQualifiedName)dt.Restriction.Enumeration[i];
                        if (!notations.Contains(notation)) {
                            throw new XmlSchemaException(Res.Sch_NotationRequired, caller);
                        }
                    }
                    return;
                }
            }
            throw new XmlSchemaException(Res.Sch_NotationRequired, caller);
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:17,代码来源:DataTypeImplementation.cs

示例15: XSODictionaryEnumerator

 internal XSODictionaryEnumerator(List<XmlSchemaObjectTable.XmlSchemaObjectEntry> entries, int size, XmlSchemaObjectTable.EnumeratorType enumType) : base(entries, size, enumType)
 {
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:3,代码来源:XmlSchemaObjectTable.cs


注:本文中的System.Xml.Schema.XmlSchemaObjectTable类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。