/// <summary>
        /// Should obtain the contents from the resource,
        /// interpret it and populate the <see cref="IConfigurationStore"/>
        /// accordingly.
        /// </summary>
        /// <param name="configurationStore">The store.</param>
        public override void ProcessResource(IConfigurationStore configurationStore)
        {
            Contract.Require.That(configurationStore, Is.Not.Null).When("retrieve argument configurationStore in ProcessResource method");
            Contract.Assert.That(Resource, Is.Not.Null).When("process Resource in ConfigurationInterpreter");

            using (Resource)
            {
                //validateSqlMap字段的有无,决定了是否进行文件规范格式的检查
                IConfiguration setting = configurationStore.Settings[ConfigConstants.ATTRIBUTE_VALIDATE_SQLMAP];
                if (setting != null)//不为空,检查格式
                {
                    bool mustValidate = false;
                    Boolean.TryParse(setting.Value, out mustValidate);//进一步确定是否必须检查
                    if (mustValidate)
                    {
                        XmlDocument document = new XmlDocument();
                        document.Load(Resource.Stream);
                        //调用规范检查类
                        SchemaValidator.Validate(document.ChildNodes[1], "SqlMapConfig.xsd");
                    }
                }

                Resource.Stream.Position = 0;
                using (XmlTextReader reader = new XmlTextReader(Resource.Stream))
                {
                    //具体到真正处理配置文件的类对象上
                    using (XmlConfigProcessor processor = new XmlConfigProcessor())
                    {
                        processor.Process(reader, configurationStore);
                    }
                }
            }

            if (logger.IsInfoEnabled)
            {
                logger.Info("Configuration Store");
                logger.Info(configurationStore.ToString());
            }
        }
        /// <summary>
        /// Adds an XML sql map configuration item.
        /// </summary>
        /// <param name="uri">A URI to XML data.</param>
        /// <param name="validate">Validate the XML sqlMap file using SqlMap.xsd</param>
        /// <example>
        /// <code>
        /// &lt;sqlMaps&gt;
        ///  &lt;sqlMap uri="file://../../Maps/Account.xml"/&gt;
        /// &lt;/sqlMaps&gt;
        /// </code>
        /// </example>
        public void AddSqlMap(string uri, bool validate)
        {
            IResource resource = ResourceLoaderRegistry.GetResource(uri);

            using (resource)
            {
                if (validate)
                {
                    XmlDocument document = new XmlDocument();
                    document.Load(resource.Stream);
                    SchemaValidator.Validate(document.ChildNodes[1], "SqlMap.xsd");
                }

                resource.Stream.Position = 0;
                using (XmlTextReader reader = new XmlTextReader(resource.Stream))
                {
                    using (XmlMappingProcessor processor = new XmlMappingProcessor())
                    {
                        processor.Process(reader, configurationStore);
                    }
                }
            }
        }