public override void Validate(XmlWriter output, SchematronRuntimeOptions options) { if (output == null) throw new ArgumentNullException("output"); if (options == null) throw new ArgumentNullException("options"); this.executable.Run(output, GetXsltOptions(options)); }
public virtual void Validate(TextWriter output, SchematronRuntimeOptions options) { if (output == null) { throw new ArgumentNullException("output"); } if (options == null) { throw new ArgumentNullException("options"); } XmlWriter writer; XPathSerializationOptions serialization = options.Serialization; if (serialization != null) { XmlWriterSettings settings = new XmlWriterSettings(); serialization.CopyTo(settings); writer = XmlWriter.Create(output, settings); } else { writer = XmlWriter.Create(output); } Validate(writer, options); writer.Close(); }
public override IXPathNavigable Validate(SchematronRuntimeOptions options) { if (options == null) { throw new ArgumentNullException("options"); } return(this.executable.Run(GetXsltOptions(options))); }
public override void Validate(XmlWriter output, SchematronRuntimeOptions options) { if (output == null) { throw new ArgumentNullException("output"); } if (options == null) { throw new ArgumentNullException("options"); } this.executable.Run(output, GetXsltOptions(options)); }
static XsltRuntimeOptions GetXsltOptions(SchematronRuntimeOptions options) { var xsltOptions = new XsltRuntimeOptions { InitialContextNode = options.Instance }; if (!String.IsNullOrEmpty(options.Phase)) { xsltOptions.Parameters.Add(new XmlQualifiedName("phase"), options.Phase); } if (options.Parameters != null) { foreach (var p in options.Parameters) { xsltOptions.Parameters.Add(p); } } return xsltOptions; }
static XsltRuntimeOptions GetXsltOptions(SchematronRuntimeOptions options) { var xsltOptions = new XsltRuntimeOptions { InitialContextNode = options.Instance }; if (!String.IsNullOrEmpty(options.Phase)) { xsltOptions.Parameters.Add(new XmlQualifiedName("phase"), options.Phase); } if (options.Parameters != null) { foreach (var p in options.Parameters) { xsltOptions.Parameters.Add(p); } } return(xsltOptions); }
public virtual void Validate(TextWriter output, SchematronRuntimeOptions options) { if (output == null) throw new ArgumentNullException("output"); if (options == null) throw new ArgumentNullException("options"); XmlWriter writer; XPathSerializationOptions serialization = options.Serialization; if (serialization != null) { XmlWriterSettings settings = new XmlWriterSettings(); serialization.CopyTo(settings); writer = XmlWriter.Create(output, settings); } else { writer = XmlWriter.Create(output); } Validate(writer, options); writer.Close(); }
public XPathNavigator Report(XPathItem schema, XPathNavigator source, string phase, IEnumerable <XPathNavigator> parameters) { var options = new SchematronRuntimeOptions { Instance = source, Phase = phase }; if (parameters != null) { foreach (XPathNavigator n in parameters) { options.Parameters.Add(new XmlQualifiedName(n.Name, n.NamespaceURI), n.TypedValue); } } SchematronInvoker invoker; if (schema.IsNode) { if (this.Processor == null) { throw new InvalidOperationException("Processor cannot be null"); } invoker = SchematronInvoker.With((XPathNavigator)schema, this.Processor); } else { Uri schemaUri = SchemaAsUri(schema); invoker = SchematronInvoker.With(schemaUri: schema.Value); } return(invoker .Validate(options) .ToDocument() .CreateNavigator()); }
public SchematronResultHandler Validate(IXPathNavigable input, string phase, object parameters) { if (input == null) { throw new ArgumentNullException("input"); } var options = new SchematronRuntimeOptions { Instance = input, InputXmlResolver = this.resolver, Phase = phase }; if (parameters != null) { foreach (PropertyDescriptor property in TypeDescriptor.GetProperties(parameters)) { options.Parameters.Add(new XmlQualifiedName(property.Name), property.GetValue(parameters)); } } return(Validate(options)); }
public abstract void Validate(XmlWriter output, SchematronRuntimeOptions options);
public SchematronResultHandler Validate(IXPathNavigable input, string phase, object parameters) { if (input == null) throw new ArgumentNullException("input"); var options = new SchematronRuntimeOptions { Instance = input, InputXmlResolver = this.resolver, Phase = phase }; if (parameters != null) { foreach (PropertyDescriptor property in TypeDescriptor.GetProperties(parameters)) { options.Parameters.Add(new XmlQualifiedName(property.Name), property.GetValue(parameters)); } } return Validate(options); }
public abstract IXPathNavigable Validate(SchematronRuntimeOptions options);
public override IXPathNavigable Validate(SchematronRuntimeOptions options) { if (options == null) throw new ArgumentNullException("options"); return this.executable.Run(GetXsltOptions(options)); }
public SchematronResultHandler Validate(SchematronRuntimeOptions options) { return new SchematronResultHandler(this.validator, options); }
internal SchematronResultHandler(SchematronValidator validator, SchematronRuntimeOptions options) { this.validator = validator; this.options = options; this.defaultSerialization = options.Serialization; }
public SchematronResultHandler Validate(SchematronRuntimeOptions options) { return(new SchematronResultHandler(this.validator, options)); }