static bool ProcessFactory(IUxmlFactory factory, Dictionary <string, SchemaInfo> schemas, FactoryProcessingHelper processingData)
        {
            if (!string.IsNullOrEmpty(factory.substituteForTypeName))
            {
                if (!processingData.IsKnownElementType(factory.substituteForTypeName, factory.substituteForTypeNamespace))
                {
                    // substituteForTypeName is not yet known. Defer processing to later.
                    return(false);
                }
            }

            string     uxmlNamespace = factory.uxmlNamespace;
            SchemaInfo schemaInfo;

            if (!schemas.TryGetValue(uxmlNamespace, out schemaInfo))
            {
                schemaInfo             = new SchemaInfo(uxmlNamespace);
                schemas[uxmlNamespace] = schemaInfo;
            }

            XmlSchemaType type = AddElementTypeToXmlSchema(factory, schemaInfo, processingData);

            AddElementToXmlSchema(factory, schemaInfo, type);

            processingData.RegisterElementType(factory.uxmlName, factory.uxmlNamespace);

            return(true);
        }
Example #2
0
        bool ProcessFactory(IUxmlFactory factory, FactoryProcessingHelper processingData)
        {
            if (!string.IsNullOrEmpty(factory.substituteForTypeName))
            {
                if (!processingData.IsKnownElementType(factory.substituteForTypeName, factory.substituteForTypeNamespace))
                {
                    // substituteForTypeName is not yet known. Defer processing to later.
                    return(false);
                }
            }

            processingData.RegisterElementType(factory);

            return(true);
        }