Esempio n. 1
0
        public NvdlValidatorGenerator GetGenerator(NvdlValidate validate, string inheritSchemaType)
        {
            this.resolver = this.XmlResolverInternal;

            string schemaType = validate.SchemaType;

            if (schemaType == null)
            {
                schemaType = inheritSchemaType;
            }
            if (schemaType == null)
            {
                schemaType = "application/xml";
            }

            foreach (NvdlValidationProvider p in providers)
            {
                NvdlValidatorGenerator g =
                    p.CreateGenerator(validate, schemaType, this);
                if (g != null)
                {
                    return(g);
                }
            }

            throw new NvdlCompileException(String.Format("Either schema type '{0}' or the target schema document is not supported in this configuration. Add custom provider that supports this schema type.", schemaType), validate);
        }
Esempio n. 2
0
 public SimpleValidate(
     NvdlValidate validate,
     NvdlCompileContext ctx)
     : base(validate)
 {
     // 6.4.7
     generator = ctx.Config.GetGenerator(validate,
                                         ctx.Rules.SchemaType);
 }
Esempio n. 3
0
 public NvdlInstanceValidationException(string message, Exception inner,
                                        NvdlValidatorGenerator generator,
                                        string nvdlLocation)
     : base(FormatMessageWithDefinition(message, nvdlLocation), inner)
 {
 }
Esempio n. 4
0
 public NvdlInstanceValidationException(string message,
                                        NvdlValidatorGenerator generator,
                                        string nvdlLocation)
     : this(message, null, generator, nvdlLocation)
 {
 }
Esempio n. 5
0
		public NvdlInstanceValidationException (string message, Exception inner,
			NvdlValidatorGenerator generator,
			string nvdlLocation)
			: base (FormatMessageWithDefinition (message, nvdlLocation), inner)
		{
		}
Esempio n. 6
0
		public NvdlInstanceValidationException (string message,
			NvdlValidatorGenerator generator,
			string nvdlLocation)
			: this (message, null, generator, nvdlLocation)
		{
		}
Esempio n. 7
0
		public SimpleValidate (
			NvdlValidate validate,
			NvdlCompileContext ctx)
			: base (validate)
		{
			// 6.4.7
			generator = ctx.Config.GetGenerator (validate,
				ctx.Rules.SchemaType);
		}