Ejemplo 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);
        }
Ejemplo n.º 2
0
 public SimpleValidate(
     NvdlValidate validate,
     NvdlCompileContext ctx)
     : base(validate)
 {
     // 6.4.7
     generator = ctx.Config.GetGenerator(validate,
                                         ctx.Rules.SchemaType);
 }
Ejemplo n.º 3
0
 public NvdlInstanceValidationException(string message, Exception inner,
                                        NvdlValidatorGenerator generator,
                                        string nvdlLocation)
     : base(FormatMessageWithDefinition(message, nvdlLocation), inner)
 {
 }
Ejemplo n.º 4
0
 public NvdlInstanceValidationException(string message,
                                        NvdlValidatorGenerator generator,
                                        string nvdlLocation)
     : this(message, null, generator, nvdlLocation)
 {
 }
Ejemplo n.º 5
0
		public NvdlInstanceValidationException (string message, Exception inner,
			NvdlValidatorGenerator generator,
			string nvdlLocation)
			: base (FormatMessageWithDefinition (message, nvdlLocation), inner)
		{
		}
Ejemplo n.º 6
0
		public NvdlInstanceValidationException (string message,
			NvdlValidatorGenerator generator,
			string nvdlLocation)
			: this (message, null, generator, nvdlLocation)
		{
		}
Ejemplo n.º 7
0
		public SimpleValidate (
			NvdlValidate validate,
			NvdlCompileContext ctx)
			: base (validate)
		{
			// 6.4.7
			generator = ctx.Config.GetGenerator (validate,
				ctx.Rules.SchemaType);
		}