/// <summary> /// Evaluate the query, sending the result to a specified destination. /// </summary> /// <param name="destination"> /// The destination for the results of the query. The class <c>XmlDestination</c> /// is an abstraction that allows a number of different kinds of destination /// to be specified. /// </param> /// <exception cref="DynamicError">Throws a <c>DynamicError</c> if any run-time failure /// occurs while evaluating the expression.</exception> public void Run(XmlDestination destination) { try { evaluator.setDestination(destination.GetUnderlyingDestination()); evaluator.run(); } catch (JSaxonApiException err) { throw new DynamicError(err); } }
/// <summary> /// Supply the destination to hold the validated document. If no destination /// is supplied, the validated document is discarded. /// </summary> /// <remarks> /// The destination differs from the source in that (a) default values of missing /// elements and attributes are supplied, and (b) the typed values of elements and /// attributes are available. However, typed values can only be accessed if the result /// is represented using the XDM data model, that is, if the destination is supplied /// as an <c>XdmDestination</c>. /// </remarks> /// <param name="destination"> /// The destination to hold the validated document. /// </param> public void SetDestination(XmlDestination destination) { schemaValidator.setDestination(destination.GetUnderlyingDestination()); }
/// <summary>Set the validation reporting feature, which saves the validation errors in an XML file</summary> /// <param name="destination"> destination where XML will be sent</param> public void SetValidityReporting(XmlDestination destination) { schemaValidator.setValidityReporting(destination.GetUnderlyingDestination()); }
JDestination XmlDestination.GetUnderlyingDestination() { return(xslt30Transformer.GetUnderlyingXslt30Transformer.asDocumentDestination(destination.GetUnderlyingDestination())); }