Exemplo n.º 1
0
        public static XshdSyntaxDefinition LoadDefinition(XmlReader reader, bool skipValidation)
        {
            reader = HighlightingLoader.GetValidatingReader(reader, false, skipValidation ? null : SchemaSet);
            XmlDocument document = new XmlDocument();

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

            return(loader.ParseDefinition(document.DocumentElement));
        }
Exemplo n.º 2
0
 static Exception Error(IXmlLineInfo lineInfo, string message)
 {
     if (lineInfo != null)
     {
         return(new HighlightingDefinitionInvalidException(HighlightingLoader.FormatExceptionMessage(message, lineInfo.LineNumber, lineInfo.LinePosition)));
     }
     else
     {
         return(new HighlightingDefinitionInvalidException(message));
     }
 }
Exemplo n.º 3
0
 public static XshdSyntaxDefinition LoadDefinition(XmlReader reader, bool skipValidation)
 {
     reader = HighlightingLoader.GetValidatingReader(reader, true, skipValidation ? null : SchemaSet);
     reader.Read();
     return(ParseDefinition(reader));
 }