/// <summary>
        /// Sets the default schema and namespace prefix that the xml editor will use.
        /// </summary>
        void SetDefaultSchema(string fileName)
        {
            if (fileName == null)
            {
                return;
            }
            string extension = Path.GetExtension(fileName).ToLower();

            view.DefaultSchemaCompletionData = XmlSchemaManager.GetSchemaCompletionData(extension);
            view.DefaultNamespacePrefix      = XmlSchemaManager.GetNamespacePrefix(extension);
        }
Exemple #2
0
        void SetDefaultSchema(string extension)
        {
            if (extension == null)
            {
                return;
            }

            defaultSchemaCompletionData = XmlSchemaManager.GetSchemaCompletionData(extension);
            if (defaultSchemaCompletionData != null)
            {
                inferredCompletionData = null;
            }
            else
            {
                QueueInference();
            }
            defaultNamespacePrefix = XmlSchemaManager.GetNamespacePrefix(extension);
        }