• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Schema.XmlSchemaAny类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: AndSchema

		public static XmlSchemaElement AndSchema()
		{
			var type = new XmlSchemaComplexType();

			var any = new XmlSchemaAny();
			any.MinOccurs = 1;
			any.MaxOccursString = "unbounded";
			any.ProcessContents = XmlSchemaContentProcessing.Strict;
			any.Namespace = "##local";

			var sequence = new XmlSchemaSequence();
			type.Particle = sequence;
			sequence.Items.Add(any);

			var attrib = new XmlSchemaAttribute();
			attrib.Name = "expressionLanguage";
			attrib.Use = XmlSchemaUse.Optional;
			attrib.SchemaTypeName = new XmlQualifiedName("string", "http://www.w3.org/2001/XMLSchema");
			type.Attributes.Add(attrib);

			attrib = new XmlSchemaAttribute();
			attrib.Name = "failMessage";
			attrib.Use = XmlSchemaUse.Optional;
			attrib.SchemaTypeName = new XmlQualifiedName("string", "http://www.w3.org/2001/XMLSchema");
			type.Attributes.Add(attrib);

			var element = new XmlSchemaElement();
			element.Name = "and";
			element.SchemaType = type;

			return element;
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:32,代码来源:XmlSpecificationSchema.cs


示例2: Visit

        protected override void Visit(XmlSchemaAny particle)
        {
            if (particle.MaxOccurs == 0)
                return;

            PushNode(ChildType.Any, particle.Parent, particle);

            foreach (XmlSchemaElement extensionElement in _schemaSetManager.GetExtensionElements(particle))
                AddLeaf(ChildType.ElementExtension, particle, extensionElement);

            PopNode();
        }
开发者ID:sergey-steinvil,项目名称:xsddoc,代码行数:12,代码来源:ChildrenFinder.cs


示例3: ImportAnyElement

		public virtual string ImportAnyElement (
			XmlSchemaAny any, 
			bool mixed, 
			XmlSchemas schemas, 
			XmlSchemaImporter importer, 
			CodeCompileUnit compileUnit, 
			CodeNamespace mainNamespace, 
			CodeGenerationOptions options, 
			CodeDomProvider codeProvider
		)
		{
			return null;
		}
开发者ID:t-ashula,项目名称:mono,代码行数:13,代码来源:SchemaImporterExtension.cs


示例4: AddDefaultDatasetType

 private static void AddDefaultDatasetType(XmlSchemaSet schemas, string localName, string ns)
 {
     XmlSchemaComplexType item = new XmlSchemaComplexType {
         Name = localName,
         Particle = new XmlSchemaSequence()
     };
     XmlSchemaElement element = new XmlSchemaElement {
         RefName = new XmlQualifiedName("schema", "http://www.w3.org/2001/XMLSchema")
     };
     ((XmlSchemaSequence) item.Particle).Items.Add(element);
     XmlSchemaAny any = new XmlSchemaAny();
     ((XmlSchemaSequence) item.Particle).Items.Add(any);
     XmlSchema schema = SchemaHelper.GetSchema(ns, schemas);
     schema.Items.Add(item);
     schemas.Reprocess(schema);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:16,代码来源:SchemaExporter.cs


示例5: AddDefaultTypedDatasetType

 private static void AddDefaultTypedDatasetType(XmlSchemaSet schemas, XmlSchema datasetSchema, string localName, string ns)
 {
     XmlSchemaComplexType item = new XmlSchemaComplexType {
         Name = localName,
         Particle = new XmlSchemaSequence()
     };
     XmlSchemaAny any = new XmlSchemaAny {
         Namespace = (datasetSchema.TargetNamespace == null) ? string.Empty : datasetSchema.TargetNamespace
     };
     ((XmlSchemaSequence) item.Particle).Items.Add(any);
     schemas.Add(datasetSchema);
     XmlSchema schema = SchemaHelper.GetSchema(ns, schemas);
     schema.Items.Add(item);
     schemas.Reprocess(datasetSchema);
     schemas.Reprocess(schema);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:16,代码来源:SchemaExporter.cs


示例6: CreateAnyType

        private static XmlSchemaComplexType CreateAnyType(XmlSchemaContentProcessing processContents)
        {
            XmlSchemaComplexType localAnyType = new XmlSchemaComplexType();
            localAnyType.SetQualifiedName(DatatypeImplementation.QnAnyType);

            XmlSchemaAny anyElement = new XmlSchemaAny();
            anyElement.MinOccurs = decimal.Zero;
            anyElement.MaxOccurs = decimal.MaxValue;

            anyElement.ProcessContents = processContents;
            anyElement.BuildNamespaceList(null);
            XmlSchemaSequence seq = new XmlSchemaSequence();
            seq.Items.Add(anyElement);

            localAnyType.SetContentTypeParticle(seq);
            localAnyType.SetContentType(XmlSchemaContentType.Mixed);

            localAnyType.ElementDecl = SchemaElementDecl.CreateAnyTypeElementDecl();
            localAnyType.ElementDecl.SchemaType = localAnyType;

            //Create contentValidator for Any
            ParticleContentValidator contentValidator = new ParticleContentValidator(XmlSchemaContentType.Mixed);
            contentValidator.Start();
            contentValidator.OpenGroup();
            contentValidator.AddNamespaceList(anyElement.NamespaceList, anyElement);
            contentValidator.AddStar();
            contentValidator.CloseGroup();
            ContentValidator anyContentValidator = contentValidator.Finish(true);
            localAnyType.ElementDecl.ContentValidator = anyContentValidator;

            XmlSchemaAnyAttribute anyAttribute = new XmlSchemaAnyAttribute();
            anyAttribute.ProcessContents = processContents;
            anyAttribute.BuildNamespaceList(null);
            localAnyType.SetAttributeWildcard(anyAttribute);
            localAnyType.ElementDecl.AnyAttribute = anyAttribute;
            return localAnyType;
        }
开发者ID:geoffkizer,项目名称:corefx,代码行数:37,代码来源:XmlSchemaComplexType.cs


示例7: GetSchema

		public XmlSchema GetSchema ()
		{
			XmlSchema s = new XmlSchema ();
			s.TargetNamespace = "http://www.go-mono.org/schemas";
			s.Id = "monoschema";
			XmlSchemaElement e = new XmlSchemaElement ();
			e.Name = "data";
			s.Items.Add (e);
			XmlSchemaComplexType cs = new XmlSchemaComplexType ();
			XmlSchemaSequence seq = new XmlSchemaSequence ();
			XmlSchemaAny any = new XmlSchemaAny ();
			any.MinOccurs = 0;
			any.MaxOccurs = decimal.MaxValue;
			seq.Items.Add (any);
			cs.Particle = seq;
			e.SchemaType = cs;
			return s;
		}
开发者ID:carrie901,项目名称:mono,代码行数:18,代码来源:ComplexDataStructure.cs


示例8: IsGroupBaseFromAny

 private bool IsGroupBaseFromAny(XmlSchemaGroupBase derivedGroupBase, XmlSchemaAny baseAny)
 {
     decimal num;
     decimal num2;
     this.CalculateEffectiveTotalRange(derivedGroupBase, out num, out num2);
     if (!this.IsValidOccurrenceRangeRestriction(num, num2, baseAny.MinOccurs, baseAny.MaxOccurs))
     {
         return false;
     }
     string minOccursString = baseAny.MinOccursString;
     baseAny.MinOccurs = 0M;
     for (int i = 0; i < derivedGroupBase.Items.Count; i++)
     {
         if (!this.IsValidRestriction((XmlSchemaParticle) derivedGroupBase.Items[i], baseAny))
         {
             baseAny.MinOccursString = minOccursString;
             return false;
         }
     }
     baseAny.MinOccursString = minOccursString;
     return true;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:22,代码来源:SchemaCollectionCompiler.cs


示例9: IsAnyFromAny

 private bool IsAnyFromAny(XmlSchemaAny derivedAny, XmlSchemaAny baseAny)
 {
     return (this.IsValidOccurrenceRangeRestriction(derivedAny, baseAny) && NamespaceList.IsSubset(derivedAny.NamespaceList, baseAny.NamespaceList));
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:4,代码来源:SchemaCollectionCompiler.cs


示例10: SetContainer

 private void SetContainer(State state, object container) {
     switch (state) {
         case State.Root:
             break;
         case State.Schema:
             break;
         case State.Annotation:
             this.annotation = (XmlSchemaAnnotation)container;
             break;
         case State.Include:
             this.include = (XmlSchemaInclude)container;
             break;
         case State.Import:
             this.import = (XmlSchemaImport)container;
             break;
         case State.Element:
             this.element = (XmlSchemaElement)container;
             break;
         case State.Attribute:
             this.attribute = (XmlSchemaAttribute)container;
             break;
         case State.AttributeGroup:
             this.attributeGroup = (XmlSchemaAttributeGroup)container;
             break;
         case State.AttributeGroupRef:
             this.attributeGroupRef = (XmlSchemaAttributeGroupRef)container;
             break;
         case State.AnyAttribute:
             this.anyAttribute = (XmlSchemaAnyAttribute)container;
             break;
         case State.Group:
             this.group = (XmlSchemaGroup)container;
             break;
         case State.GroupRef:
             this.groupRef = (XmlSchemaGroupRef)container;
             break;
         case State.All:
             this.all = (XmlSchemaAll)container;
             break;
         case State.Choice:
             this.choice = (XmlSchemaChoice)container;
             break;
         case State.Sequence:
             this.sequence = (XmlSchemaSequence)container;
             break;
         case State.Any:
             this.anyElement = (XmlSchemaAny)container;
             break;
         case State.Notation:
             this.notation = (XmlSchemaNotation)container;
             break;
         case State.SimpleType:
             this.simpleType = (XmlSchemaSimpleType)container;
             break;
         case State.ComplexType:
             this.complexType = (XmlSchemaComplexType)container;
             break;
         case State.ComplexContent:
             this.complexContent = (XmlSchemaComplexContent)container;
             break;
         case State.ComplexContentExtension:
             this.complexContentExtension = (XmlSchemaComplexContentExtension)container;
             break;
         case State.ComplexContentRestriction:
             this.complexContentRestriction = (XmlSchemaComplexContentRestriction)container;
             break;
         case State.SimpleContent:
             this.simpleContent = (XmlSchemaSimpleContent)container;
             break;
         case State.SimpleContentExtension:
             this.simpleContentExtension = (XmlSchemaSimpleContentExtension)container;
             break;
         case State.SimpleContentRestriction:
             this.simpleContentRestriction = (XmlSchemaSimpleContentRestriction)container;
             break;
         case State.SimpleTypeUnion:
             this.simpleTypeUnion = (XmlSchemaSimpleTypeUnion)container;
             break;
         case State.SimpleTypeList:
             this.simpleTypeList = (XmlSchemaSimpleTypeList)container;
             break;
         case State.SimpleTypeRestriction:
             this.simpleTypeRestriction = (XmlSchemaSimpleTypeRestriction)container;
             break;
         case State.Unique:
         case State.Key:
         case State.KeyRef:
             this.identityConstraint = (XmlSchemaIdentityConstraint)container;
             break;
         case State.Selector:
         case State.Field:
             this.xpath = (XmlSchemaXPath)container;
             break;
         case State.MinExclusive:
         case State.MinInclusive:
         case State.MaxExclusive:
         case State.MaxInclusive:
         case State.TotalDigits:
         case State.FractionDigits:
         case State.Length:
//.........这里部分代码省略.........
开发者ID:uQr,项目名称:referencesource,代码行数:101,代码来源:XsdBuilder.cs


示例11: GetTypedDataSetSchema

 public static XmlSchemaComplexType GetTypedDataSetSchema(XmlSchemaSet xs)
 {
     DsNpStat stat = new DsNpStat();
     XmlSchemaComplexType type = new XmlSchemaComplexType();
     XmlSchemaSequence sequence = new XmlSchemaSequence();
     xs.Add(stat.GetSchemaSerializable());
     XmlSchemaAny item = new XmlSchemaAny {
         Namespace = stat.Namespace
     };
     sequence.Items.Add(item);
     type.Particle = sequence;
     return type;
 }
开发者ID:TGHGH,项目名称:MES-CAR,代码行数:13,代码来源:DsNpStat.cs


示例12: IsAnyFromAny

 private bool IsAnyFromAny(XmlSchemaAny derivedAny, XmlSchemaAny baseAny) {
     if (!IsValidOccurrenceRangeRestriction(derivedAny, baseAny)) {
         restrictionErrorMsg = Res.GetString(Res.Sch_AnyFromAnyRule1);
         return false;
     }
     if (!NamespaceList.IsSubset(derivedAny.NamespaceList, baseAny.NamespaceList)) {
         restrictionErrorMsg = Res.GetString(Res.Sch_AnyFromAnyRule2);
         return false;
     }
     if ((int)derivedAny.ProcessContentsCorrect < (int)baseAny.ProcessContentsCorrect) {
         restrictionErrorMsg = Res.GetString(Res.Sch_AnyFromAnyRule3);
         return false;
     }
     return true;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:15,代码来源:SchemaSetCompiler.cs


示例13: AddProbeType

        static void AddProbeType(DiscoveryVersion discoveryVersion, XmlSchema schema)
        {
            // <xs:complexType name="ProbeType">
            XmlSchemaComplexType probeType = new XmlSchemaComplexType();
            probeType.Name = ProtocolStrings.SchemaNames.ProbeType;

            //   <xs:sequence>
            XmlSchemaSequence probeTypeSequence = new XmlSchemaSequence();

            //     <xs:element ref="tns:Types" minOccurs="0" />
            XmlSchemaElement typesElement = new XmlSchemaElement();
            typesElement.RefName = discoveryVersion.Implementation.QualifiedNames.TypesElement;
            typesElement.MinOccurs = 0;

            //     <xs:element ref="tns:Scopes" minOccurs="0" />
            XmlSchemaElement scopesElement = new XmlSchemaElement();
            scopesElement.RefName = discoveryVersion.Implementation.QualifiedNames.ScopesElement;
            scopesElement.MinOccurs = 0;

            //     <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
            XmlSchemaAny any = new XmlSchemaAny();
            any.Namespace = "##other";
            any.ProcessContents = XmlSchemaContentProcessing.Lax;
            any.MinOccurs = 0;
            any.MaxOccurs = decimal.MaxValue;

            //   </xs:sequence>
            probeTypeSequence.Items.Add(typesElement);
            probeTypeSequence.Items.Add(scopesElement);
            probeTypeSequence.Items.Add(any);

            //   <xs:anyAttribute namespace="##other" processContents="lax" />
            XmlSchemaAnyAttribute anyAttribue = new XmlSchemaAnyAttribute();
            anyAttribue.Namespace = "##other";
            anyAttribue.ProcessContents = XmlSchemaContentProcessing.Lax;

            // </xs:complexType>
            probeType.Particle = probeTypeSequence;
            probeType.AnyAttribute = anyAttribue;

            schema.Items.Add(probeType);
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:42,代码来源:SchemaUtility.cs


示例14: AddProbeMatchType

        static void AddProbeMatchType(DiscoveryVersion discoveryVersion, XmlSchema schema)
        {
            // <xs:complexType name="ProbeMatchType">
            XmlSchemaComplexType probeMatchType = new XmlSchemaComplexType();
            probeMatchType.Name = ProtocolStrings.SchemaNames.ProbeMatchType;

            //   <xs:sequence>
            XmlSchemaSequence probeMatcheSequence = new XmlSchemaSequence();

            //     <xs:element ref="wsa:EndpointReference" />
            XmlSchemaElement eprElement = new XmlSchemaElement();
            eprElement.RefName = discoveryVersion.Implementation.QualifiedNames.EprElement;

            //     <xs:element minOccurs="0" ref="tns:Types" />
            XmlSchemaElement typesElement = new XmlSchemaElement();
            typesElement.RefName = discoveryVersion.Implementation.QualifiedNames.TypesElement;
            typesElement.MinOccurs = 0;

            //     <xs:element minOccurs="0" ref="tns:Scopes" />
            XmlSchemaElement scopesElement = new XmlSchemaElement();
            scopesElement.RefName = discoveryVersion.Implementation.QualifiedNames.ScopesElement;
            scopesElement.MinOccurs = 0;

            //     <xs:element minOccurs="0" ref="tns:XAddrs" />
            XmlSchemaElement xAddrsElement = new XmlSchemaElement();
            xAddrsElement.RefName = discoveryVersion.Implementation.QualifiedNames.XAddrsElement;
            xAddrsElement.MinOccurs = 0;

            //     <xs:element ref="tns:MetadataVersion" /> -- allowing minOccurs=0 because the same type is used for Bye messages
            XmlSchemaElement metadataVersionElement = new XmlSchemaElement();
            metadataVersionElement.RefName = discoveryVersion.Implementation.QualifiedNames.MetadataVersionElement;
            metadataVersionElement.MinOccurs = 0;

            //     <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other" processContents="lax" />
            XmlSchemaAny any = new XmlSchemaAny();
            any.Namespace = "##other";
            any.ProcessContents = XmlSchemaContentProcessing.Lax;
            any.MinOccurs = 0;
            any.MaxOccurs = decimal.MaxValue;

            //   </xs:sequence>
            probeMatcheSequence.Items.Add(eprElement);
            probeMatcheSequence.Items.Add(typesElement);
            probeMatcheSequence.Items.Add(scopesElement);
            probeMatcheSequence.Items.Add(xAddrsElement);
            probeMatcheSequence.Items.Add(metadataVersionElement);
            probeMatcheSequence.Items.Add(any);

            //   <xs:anyAttribute namespace="##other" processContents="lax" />
            XmlSchemaAnyAttribute anyAttribue = new XmlSchemaAnyAttribute();
            anyAttribue.Namespace = "##other";
            anyAttribue.ProcessContents = XmlSchemaContentProcessing.Lax;

            // </xs:complexType>
            probeMatchType.Particle = probeMatcheSequence;
            probeMatchType.AnyAttribute = anyAttribue;

            schema.Items.Add(probeMatchType);
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:59,代码来源:SchemaUtility.cs


示例15: AddResolveType

        static void AddResolveType(DiscoveryVersion discoveryVersion, XmlSchema schema)
        {
            //<xs:complexType name="ResolveType" >
            XmlSchemaComplexType resolveType = new XmlSchemaComplexType();
            resolveType.Name = ProtocolStrings.SchemaNames.ResolveType;

            //   <xs:sequence>
            XmlSchemaSequence resolveSequence = new XmlSchemaSequence();

            //     <xs:element ref="wsa:EndpointReference" />
            XmlSchemaElement eprElement = new XmlSchemaElement();
            eprElement.RefName = discoveryVersion.Implementation.QualifiedNames.EprElement;

            //     <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other" processContents="lax" />
            XmlSchemaAny any = new XmlSchemaAny();
            any.Namespace = "##other";
            any.ProcessContents = XmlSchemaContentProcessing.Lax;
            any.MinOccurs = 0;
            any.MaxOccurs = decimal.MaxValue;

            resolveSequence.Items.Add(eprElement);
            resolveSequence.Items.Add(any);

            //   <xs:anyAttribute namespace="##other" processContents="lax" />
            XmlSchemaAnyAttribute anyAttribue = new XmlSchemaAnyAttribute();
            anyAttribue.Namespace = "##other";
            anyAttribue.ProcessContents = XmlSchemaContentProcessing.Lax;

            // </xs:complexType>
            resolveType.Particle = resolveSequence;
            resolveType.AnyAttribute = anyAttribue;

            schema.Items.Add(resolveType);
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:34,代码来源:SchemaUtility.cs


示例16: CreateAnyType

 static XmlSchemaComplexType CreateAnyType()
 {
     XmlSchemaComplexType anyType = new XmlSchemaComplexType();
     anyType.IsMixed = true;
     anyType.Particle = new XmlSchemaSequence();
     XmlSchemaAny any = new XmlSchemaAny();
     any.MinOccurs = 0;
     any.MaxOccurs = Decimal.MaxValue;
     any.ProcessContents = XmlSchemaContentProcessing.Lax;
     ((XmlSchemaSequence)anyType.Particle).Items.Add(any);
     anyType.AnyAttribute = new XmlSchemaAnyAttribute();
     return anyType;
 }
开发者ID:Profit0004,项目名称:mono,代码行数:13,代码来源:SchemaExporter_mobile.cs


示例17: IsElementFromAny

 private bool IsElementFromAny(XmlSchemaElement derivedElement, XmlSchemaAny baseAny) {
     if (!baseAny.Allows(derivedElement.QualifiedName)) {
         restrictionErrorMsg = Res.GetString(Res.Sch_ElementFromAnyRule1, derivedElement.QualifiedName.ToString());
         return false;
     }
     if (!IsValidOccurrenceRangeRestriction(derivedElement, baseAny)) {
         restrictionErrorMsg = Res.GetString(Res.Sch_ElementFromAnyRule2, derivedElement.QualifiedName.ToString());
         return false;
     }
     return true;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:11,代码来源:SchemaSetCompiler.cs


示例18: ExamineAttributeWildcardIntersection

		// 3.8.6. Attribute Wildcard Intersection
		// Only try to examine if their intersection is expressible, and
		// returns true if the result is empty.
		public bool ExamineAttributeWildcardIntersection (XmlSchemaAny other,
			ValidationEventHandler h, XmlSchema schema)
		{
			// 1.
			if (this.HasValueAny == other.HasValueAny &&
				this.HasValueLocal == other.HasValueLocal &&
				this.HasValueOther == other.HasValueOther &&
				this.HasValueTargetNamespace == other.HasValueTargetNamespace &&
				this.ResolvedProcessing == other.ResolvedProcessContents) {
				bool notEqual = false;
				for (int i = 0; i < this.ResolvedNamespaces.Count; i++) {
					if (!other.ResolvedNamespaces.Contains (this.ResolvedNamespaces [i]))
						notEqual = true;
				}
				if (!notEqual)
					return false;
			}
			// 2.
			if (this.HasValueAny)
				return !other.HasValueAny &&
					!other.HasValueLocal &&
					!other.HasValueOther &&
					!other.HasValueTargetNamespace &&
					other.ResolvedNamespaces.Count == 0;
			if (other.HasValueAny)
				return !this.HasValueAny &&
					!this.HasValueLocal &&
					!this.HasValueOther &&
					!this.HasValueTargetNamespace &&
					this.ResolvedNamespaces.Count == 0;
			// 5.
			if (this.HasValueOther && other.HasValueOther && this.TargetNamespace != other.TargetNamespace) {
//				xsobj.error (h, "The Wildcard intersection is not expressible.");
				return false;
			}
			// 3.
			if (this.HasValueOther) {
				if (other.HasValueLocal && this.TargetNamespace != String.Empty)
					return false;
				if (other.HasValueTargetNamespace && this.TargetNamespace != other.TargetNamespace)
					return false;
				return other.ValidateWildcardAllowsNamespaceName (this.TargetNamespace, h, schema, false);
			}
			if (other.HasValueOther) {
				if (this.HasValueLocal && other.TargetNamespace != String.Empty)
					return false;
				if (this.HasValueTargetNamespace && other.TargetNamespace != this.TargetNamespace)
					return false;
				return this.ValidateWildcardAllowsNamespaceName (other.TargetNamespace, h, schema, false);
			}
			// 4.
			if (this.ResolvedNamespaces.Count > 0) {
				for (int i = 0; i < this.ResolvedNamespaces.Count; i++)
					if (other.ResolvedNamespaces.Contains (this.ResolvedNamespaces [i]))
						return false;
			}
			return true;
		}
开发者ID:nobled,项目名称:mono,代码行数:61,代码来源:XsdWildcard.cs


示例19: IsGroupBaseFromAny

 private bool IsGroupBaseFromAny(XmlSchemaGroupBase derivedGroupBase, XmlSchemaAny baseAny) {
     decimal minOccurs, maxOccurs;
     CalculateEffectiveTotalRange(derivedGroupBase, out minOccurs, out maxOccurs);
     if (!IsValidOccurrenceRangeRestriction(minOccurs, maxOccurs, baseAny.MinOccurs, baseAny.MaxOccurs)) {
         restrictionErrorMsg = Res.GetString(Res.Sch_GroupBaseFromAny2, derivedGroupBase.LineNumber.ToString(NumberFormatInfo.InvariantInfo), derivedGroupBase.LinePosition.ToString(NumberFormatInfo.InvariantInfo), baseAny.LineNumber.ToString(NumberFormatInfo.InvariantInfo), baseAny.LinePosition.ToString(NumberFormatInfo.InvariantInfo));
         return false;
     }
     // eliminate occurrance range check
     string minOccursAny = baseAny.MinOccursString;
     baseAny.MinOccurs = decimal.Zero;
     for (int i = 0; i < derivedGroupBase.Items.Count; ++i) {
         if (!IsValidRestriction((XmlSchemaParticle)derivedGroupBase.Items[i], baseAny)) {
             restrictionErrorMsg = Res.GetString(Res.Sch_GroupBaseFromAny1);
             baseAny.MinOccursString = minOccursAny;
             return false;
         }
     }
     baseAny.MinOccursString = minOccursAny;
     return true;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:20,代码来源:SchemaSetCompiler.cs


示例20: BuildAnyProperty

        private ClrWildCardPropertyInfo BuildAnyProperty(XmlSchemaAny any, bool addToTypeDef)
        {
            ClrWildCardPropertyInfo property = new ClrWildCardPropertyInfo(any.Namespace, any.GetTargetNS(), addToTypeDef, GetOccurence(any));
            property.PropertyName = Constants.Any;

            return property;
        }
开发者ID:dipdapdop,项目名称:linqtoxsd,代码行数:7,代码来源:XsdToTypesConverter.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Schema.XmlSchemaAnyAttribute类代码示例发布时间:2022-05-26
下一篇:
C# Schema.XmlSchemaAnnotation类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap