Exemplo n.º 1
0
        //static XmlSchemaSet schemaSet;

        //static XmlSchemaSet SchemaSet {
        //	get {
        //		if (schemaSet == null) {
        //			schemaSet = HighlightingLoader.LoadSchemaSet(new XmlTextReader(
        //				Resources.OpenStream("ModeV1.xsd")));
        //		}
        //		return schemaSet;
        //	}
        //}

        public static XshdSyntaxDefinition LoadDefinition(XmlReader reader, bool skipValidation)
        {
            reader = HighlightingLoader.GetValidatingReader(reader, false);
            XmlDocument document = new XmlDocument();

            document.Load(reader);
            V1Loader loader = new V1Loader();

            return(loader.ParseDefinition(document.DocumentElement));
        }
Exemplo n.º 2
0
        //static XmlSchemaSet schemaSet;

        //static XmlSchemaSet SchemaSet
        //{
        //    get
        //    {
        //        if (schemaSet == null)
        //        {
        //            schemaSet = HighlightingLoader.LoadSchemaSet(XmlReader.Create(
        //                Resources.OpenStream("ModeV2.xsd")));
        //        }
        //        return schemaSet;
        //    }
        //}

        public static XshdSyntaxDefinition LoadDefinition(XmlReader reader, bool skipValidation)
        {
            reader = HighlightingLoader.GetValidatingReader(reader, true);
            reader.Read();
            return(ParseDefinition(reader));
        }