/// <summary> /// Prepares the member level additional resource resolver with all of the additional schemas /// </summary> private void PrepareResourceResolver() { if (m_additionalSchemas != null) { m_additionalResourceResolver = new ResourceResolver(); foreach (object additionalSchemaObject in m_additionalSchemas) { AdditionalSchema additionalSchema = additionalSchemaObject as AdditionalSchema; if (additionalSchema != null) { m_additionalResourceResolver.AddResource(additionalSchema.Identifier, additionalSchema.Xsd); } } } }
/// <summary> /// Adds an additional resource. This could be extra XML which is imported into the transformation using the XSL document function. /// </summary> /// <param name="identifier">Identification or URI, as appears in XSL transform.</param> /// <param name="resource">Content of additional resource.</param> public void AddResource(string identifier, string resource) { //validate input parameters if (identifier == null) { throw new ArgumentNullException("identifier"); } else if (identifier.Length == 0) { throw new ArgumentOutOfRangeException("name"); } else if (resource == null) { throw new ArgumentNullException("resource"); } else if (resource.Length == 0) { throw new ArgumentOutOfRangeException("resource"); } //add the resouce _additionalResourceResolver.AddResource(identifier, resource); }
/// <summary> /// Prepares the member level additional resource resolver with all of the additional schemas /// </summary> private void PrepareResourceResolver() { if (m_additionalSchemas != null) { m_additionalResourceResolver = new ResourceResolver(); foreach (object additionalSchemaObject in m_additionalSchemas) { AdditionalSchema additionalSchema = additionalSchemaObject as AdditionalSchema; if (additionalSchema != null) { m_additionalResourceResolver.AddResource(additionalSchema.Identifier, additionalSchema.Xsd); } } } }