Exemple #1
0
        /// <summary>
        /// Supply the instance document to be validated in the form of a Uri reference
        /// </summary>
        /// <param name="uri">URI of the document to be validated</param>

        public void SetSource(Uri uri)
        {
            StreamSource    ss  = new StreamSource(uri.ToString());
            AugmentedSource aug = AugmentedSource.makeAugmentedSource(ss);

            aug.setPleaseCloseAfterUse(true);
            this.source = aug;
        }
Exemple #2
0
        /// <summary>
        /// Compile a schema, retrieving the source using a URI. The resulting schema components are added
        /// to the cache.
        /// </summary>
        /// <remarks>
        /// The document located via the URI is parsed using the <c>System.Xml</c> parser.
        /// </remarks>
        /// <param name="uri">The URI identifying the location where the schema document can be
        /// found</param>

        public void Compile(Uri uri)
        {
            StreamSource    ss  = new StreamSource(uri.ToString());
            AugmentedSource aug = AugmentedSource.makeAugmentedSource(ss);

            aug.setPleaseCloseAfterUse(true);
            if (errorList == null)
            {
                config.addSchemaSource(aug);
            }
            else
            {
                config.addSchemaSource(aug, new ErrorGatherer(errorList));
            }
        }