Inheritance: XmlSchemaAnnotated
Example #1
0
		// 3.4.2 Complex Content Schema Component {content type} 1.2.1
		private XmlSchemaContentType GetComplexContentType (XmlSchemaContentModel content)
		{
			if (this.IsMixed || ((XmlSchemaComplexContent) content).IsMixed)
				return XmlSchemaContentType.Mixed;
			else
				return XmlSchemaContentType.ElementOnly;
		}
        private static void ExtractContentItems( XmlSchemaContentModel contentModel,
            Dictionary<string, XmlSchemaObject> xmlSchemaObjects)
        {
            var cm = contentModel as XmlSchemaComplexContent;
            var cce = contentModel.Content as XmlSchemaComplexContentExtension;
            var sce = contentModel.Content as XmlSchemaSimpleContentExtension;
            var ccr = contentModel.Content as XmlSchemaComplexContentRestriction;
            var scr = contentModel.Content as XmlSchemaSimpleContentRestriction;

            bool isMixedContent = cm != null && cm.IsMixed;

            if (cce != null)
            {
                XmlQualifiedName baseTypeName = cce.BaseTypeName;
                ExtractSequenceItems( cce, xmlSchemaObjects );
                ExtractAttributes( cce, xmlSchemaObjects );
            }
            if (sce != null)
            {
                int i = 0;
            }
            if (ccr != null)
            {
                int i = 0;
            }
            if (scr != null)
            {
                int i = 0;
            }
        }
        protected virtual void Visit(XmlSchemaContentModel model)
        {
            XmlSchemaSimpleContent simpleContent;
            XmlSchemaComplexContent complexContent;

            if (Casting.TryCast(model, out simpleContent))
                Visit(simpleContent);
            else if (Casting.TryCast(model, out complexContent))
                Visit(complexContent);
            else
                throw ExceptionBuilder.UnexpectedSchemaObjectType(model);
        }
Example #4
0
 private void NavigateContentModel(XmlSchemaContentModel contentModel)
 {
     if(contentModel is XmlSchemaSimpleContent)
         NavigateSimpleContent((XmlSchemaSimpleContent)contentModel);
     else
         NavigateComplexContent((XmlSchemaComplexContent)contentModel);
 }