Esempio n. 1
0
        internal override XmlSchemaParticle GetOptimizedParticle(bool isTop)
        {
            if (OptimizedParticle != null)
            {
                return(OptimizedParticle);
            }
            // Uncommenting this causes incorrect validation.
            // It will prevent UPA e.g. msxsdtest/Particles/particlesJf006.xsd
//			if (ValidatedMaxOccurs == 0) {
//				OptimizedParticle = XmlSchemaParticle.Empty;
//				return OptimizedParticle;
//			}

            XmlSchemaAny any = new XmlSchemaAny();

            CopyInfo(any);
            any.CompileOccurence(null, null);
            any.wildcard      = this.wildcard;
            OptimizedParticle = any;

            // properties which never contribute to validation
            any.Namespace           = Namespace;
            any.ProcessContents     = ProcessContents;
            any.Annotation          = Annotation;
            any.UnhandledAttributes = UnhandledAttributes;

            return(OptimizedParticle);
        }
Esempio n. 2
0
        internal override XmlSchemaParticle GetOptimizedParticle(bool isTop)
        {
            if (this.OptimizedParticle != null)
            {
                return(this.OptimizedParticle);
            }
            XmlSchemaAny xmlSchemaAny = new XmlSchemaAny();

            this.CopyInfo(xmlSchemaAny);
            xmlSchemaAny.CompileOccurence(null, null);
            xmlSchemaAny.wildcard            = this.wildcard;
            this.OptimizedParticle           = xmlSchemaAny;
            xmlSchemaAny.Namespace           = this.Namespace;
            xmlSchemaAny.ProcessContents     = this.ProcessContents;
            xmlSchemaAny.Annotation          = base.Annotation;
            xmlSchemaAny.UnhandledAttributes = base.UnhandledAttributes;
            return(this.OptimizedParticle);
        }
		internal override XmlSchemaParticle GetOptimizedParticle (bool isTop)
		{
			if (OptimizedParticle != null)
				return OptimizedParticle;
			// Uncommenting this causes incorrect validation. 
			// It will prevent UPA e.g. msxsdtest/Particles/particlesJf006.xsd
//			if (ValidatedMaxOccurs == 0) {
//				OptimizedParticle = XmlSchemaParticle.Empty;
//				return OptimizedParticle;
//			}

			XmlSchemaAny any = new XmlSchemaAny ();
			CopyInfo (any);
			any.CompileOccurence (null, null);
			any.wildcard = this.wildcard;
			OptimizedParticle = any;

			// properties which never contribute to validation
			any.Namespace = Namespace;
			any.ProcessContents = ProcessContents;
			any.Annotation = Annotation;
			any.UnhandledAttributes = UnhandledAttributes;

			return OptimizedParticle;
		}