Add EMS as well known namespace
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2005 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
/*
|
||||
* Copyright <20> 2002-2005 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#endregion
|
||||
@@ -81,8 +81,8 @@ namespace Spring.Objects.Factory.Xml
|
||||
private static IDictionary parsers;
|
||||
private readonly static IDictionary wellknownNamespaceParserTypeNames;
|
||||
|
||||
#if !NET_2_0
|
||||
private static XmlSchemaCollection schemas;
|
||||
#if !NET_2_0
|
||||
private static XmlSchemaCollection schemas;
|
||||
#else
|
||||
private static XmlSchemaSet schemas;
|
||||
#endif
|
||||
@@ -100,6 +100,7 @@ namespace Spring.Objects.Factory.Xml
|
||||
wellknownNamespaceParserTypeNames["http://www.springframework.net/db"] = "Spring.Data.Config.DatabaseNamespaceParser, Spring.Data";
|
||||
wellknownNamespaceParserTypeNames["http://www.springframework.net/remoting"] = "Spring.Remoting.Config.RemotingNamespaceParser, Spring.Services";
|
||||
wellknownNamespaceParserTypeNames["http://www.springframework.net/nms"] = "Spring.Messaging.Nms.Config.NmsNamespaceParser, Spring.Messaging.Nms";
|
||||
wellknownNamespaceParserTypeNames["http://www.springframework.net/ems"] = "Spring.Messaging.Ems.Config.EmsNamespaceParser, Spring.Messaging.Ems";
|
||||
wellknownNamespaceParserTypeNames["http://www.springframework.net/validation"] = "Spring.Validation.Config.ValidationNamespaceParser, Spring.Core";
|
||||
|
||||
Reset();
|
||||
@@ -112,8 +113,8 @@ namespace Spring.Objects.Factory.Xml
|
||||
public static void Reset()
|
||||
{
|
||||
parsers = new HybridDictionary();
|
||||
#if !NET_2_0
|
||||
schemas = new XmlSchemaCollection();
|
||||
#if !NET_2_0
|
||||
schemas = new XmlSchemaCollection();
|
||||
#else
|
||||
schemas = new XmlSchemaSet();
|
||||
schemas.XmlResolver = new XmlResourceUrlResolver();
|
||||
@@ -193,8 +194,8 @@ namespace Spring.Objects.Factory.Xml
|
||||
/// <returns>
|
||||
/// A schema collection containing validation schemas for all registered parsers.
|
||||
/// </returns>
|
||||
#if !NET_2_0
|
||||
public static XmlSchemaCollection GetSchemas()
|
||||
#if !NET_2_0
|
||||
public static XmlSchemaCollection GetSchemas()
|
||||
#else
|
||||
public static XmlSchemaSet GetSchemas()
|
||||
#endif
|
||||
@@ -392,12 +393,12 @@ namespace Spring.Objects.Factory.Xml
|
||||
IResource schema = resourceLoader.GetResource(schemaLocation);
|
||||
try
|
||||
{
|
||||
#if NET_1_0
|
||||
#if NET_1_0
|
||||
XmlTextReader schemaDocument = new XmlTextReader(schemaLocation, schema.InputStream);
|
||||
schemas.Add(namespaceUri, schemaDocument);
|
||||
#elif NET_1_1
|
||||
schemas.Add(namespaceUri, schemaDocument);
|
||||
#elif NET_1_1
|
||||
XmlTextReader schemaDocument = new XmlTextReader(schemaLocation, schema.InputStream);
|
||||
schemas.Add(namespaceUri, schemaDocument, new XmlResourceUrlResolver());
|
||||
schemas.Add(namespaceUri, schemaDocument, new XmlResourceUrlResolver());
|
||||
#else
|
||||
XmlTextReader schemaDocument = new XmlTextReader(schema.Uri.AbsoluteUri, schema.InputStream);
|
||||
schemas.Add(namespaceUri, schemaDocument);
|
||||
|
||||
Reference in New Issue
Block a user