From f819dffdadf20e22e11784b0eb30b9c59087a4bf Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Mon, 10 Nov 2014 18:11:48 -0800 Subject: [PATCH] Get XML building in VS by switching to standard .resx --- src/System.Xml.Common/System/SR.cs | 66 +- .../Res/resources.resjson | 40 - .../Resources/Strings.Designer.cs | 298 +++++++ .../Resources/Strings.resx | 198 +++++ .../System.Xml.XDocument.csproj | 19 +- .../Res/resources.resjson | 6 - .../Resources/Strings.Designer.cs | 100 +++ .../Resources/Strings.resx | 132 +++ .../System.Xml.XPath.XDocument.csproj | 21 +- .../Res/resources.resjson | 51 -- .../Resources/Strings.Designer.cs | 505 +++++++++++ .../Resources/Strings.resx | 267 ++++++ .../System.Xml.XPath.XmlDocument.csproj | 19 +- src/System.Xml.XPath/Res/resources.resjson | 59 -- .../Resources/Strings.Designer.cs | 577 ++++++++++++ src/System.Xml.XPath/Resources/Strings.resx | 291 +++++++ src/System.Xml.XPath/System.Xml.XPath.csproj | 19 +- .../src/Res/resources.resjson | 86 -- .../src/Resources/Strings.Designer.cs | 820 ++++++++++++++++++ .../src/Resources/Strings.resx | 372 ++++++++ .../src/System.Xml.XmlDocument.csproj | 20 +- 21 files changed, 3639 insertions(+), 327 deletions(-) delete mode 100644 src/System.Xml.XDocument/Res/resources.resjson create mode 100644 src/System.Xml.XDocument/Resources/Strings.Designer.cs create mode 100644 src/System.Xml.XDocument/Resources/Strings.resx delete mode 100644 src/System.Xml.XPath.XDocument/Res/resources.resjson create mode 100644 src/System.Xml.XPath.XDocument/Resources/Strings.Designer.cs create mode 100644 src/System.Xml.XPath.XDocument/Resources/Strings.resx delete mode 100644 src/System.Xml.XPath.XmlDocument/Res/resources.resjson create mode 100644 src/System.Xml.XPath.XmlDocument/Resources/Strings.Designer.cs create mode 100644 src/System.Xml.XPath.XmlDocument/Resources/Strings.resx delete mode 100644 src/System.Xml.XPath/Res/resources.resjson create mode 100644 src/System.Xml.XPath/Resources/Strings.Designer.cs create mode 100644 src/System.Xml.XPath/Resources/Strings.resx delete mode 100644 src/System.Xml.XmlDocument/src/Res/resources.resjson create mode 100644 src/System.Xml.XmlDocument/src/Resources/Strings.Designer.cs create mode 100644 src/System.Xml.XmlDocument/src/Resources/Strings.resx diff --git a/src/System.Xml.Common/System/SR.cs b/src/System.Xml.Common/System/SR.cs index 06b7a4193c1b..46fa2a9d6c30 100644 --- a/src/System.Xml.Common/System/SR.cs +++ b/src/System.Xml.Common/System/SR.cs @@ -1,98 +1,36 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System.Resources; -using System.Runtime.CompilerServices; -using System.Text; - namespace System { - internal static partial class SR + internal class SR : global::Resources.Strings { - static ResourceManager s_resourceManager; - - private static ResourceManager ResourceManager - { - get - { - if (SR.s_resourceManager == null) - { - // In ProjectN, the following constructor ResourceManager(Type) is going to be replaced by the private constructor ResourceManager(String) - // we'll pass s_resourcesName to this constructor - SR.s_resourceManager = new ResourceManager(typeof(SR)); - } - return SR.s_resourceManager; - } - } - - // This method is used to decide if we need to append the exception message parameters to the message when calling SR.Format. - // by default it returns false. We overwrite the implementation of this method to return true through IL transformer - // when compiling ProjectN app as retail build. - [MethodImpl(MethodImplOptions.NoInlining)] - private static bool UsingResourceKeys() + private SR() { - return false; - } - - internal static string GetResourceString(string resourceKey, string defaultString) - { - string resourceString = null; - try { resourceString = ResourceManager.GetString(resourceKey); } catch (MissingManifestResourceException) { } - - // if we are running on desktop, ResourceManager.GetString will just return resourceKey. so - // in this case we'll return defaultString (if it is not null) - if (defaultString != null && resourceKey.Equals(resourceString, StringComparison.Ordinal)) - { - return defaultString; - } - - return resourceString; } internal static string Format(string resourceFormat, params object[] args) { if (args != null) { - if (UsingResourceKeys()) - { - return resourceFormat + String.Join(", ", args); - } - return String.Format(resourceFormat, args); } return resourceFormat; } - [MethodImpl(MethodImplOptions.NoInlining)] internal static string Format(string resourceFormat, object p1) { - if (UsingResourceKeys()) - { - return String.Join(", ", resourceFormat, p1); - } - return String.Format(resourceFormat, p1); } - [MethodImpl(MethodImplOptions.NoInlining)] internal static string Format(string resourceFormat, object p1, object p2) { - if (UsingResourceKeys()) - { - return String.Join(", ", resourceFormat, p1, p2); - } - return String.Format(resourceFormat, p1, p2); } - [MethodImpl(MethodImplOptions.NoInlining)] internal static string Format(string resourceFormat, object p1, object p2, object p3) { - if (UsingResourceKeys()) - { - return String.Join(", ", resourceFormat, p1, p2, p3); - } return String.Format(resourceFormat, p1, p2, p3); } } diff --git a/src/System.Xml.XDocument/Res/resources.resjson b/src/System.Xml.XDocument/Res/resources.resjson deleted file mode 100644 index 59887ffd3d81..000000000000 --- a/src/System.Xml.XDocument/Res/resources.resjson +++ /dev/null @@ -1,40 +0,0 @@ -{ - // ==++== - // - // Copyright (c) Microsoft Corporation. All rights reserved. - // - // ==--== - - // NOTE: do not use \", use ' instead - // NOTE: Use # or ; for comments - - // These are the managed resources for System.Xml.Linq.dll. See - // ResourceManager documentation and the ResGen tool. - - "Argument_AddAttribute" : "An attribute cannot be added to content.", - "Argument_AddNode" : "A node of type {0} cannot be added to content.", - "Argument_AddNonWhitespace" : "Non white space characters cannot be added to content.", - "Argument_ConvertToString" : "The argument cannot be converted to a string.", - "Argument_InvalidExpandedName" : "'{0}' is an invalid expanded name.", - "Argument_InvalidPIName" : "'{0}' is an invalid name for a processing instruction.", - "Argument_InvalidPrefix" : "'{0}' is an invalid prefix.", - "Argument_MustBeDerivedFrom" : "The argument must be derived from {0}.", - "Argument_NamespaceDeclarationPrefixed" : "The prefix '{0}' cannot be bound to the empty namespace name.", - "Argument_NamespaceDeclarationXml" : "The prefix 'xml' is bound to the namespace name 'http://www.w3.org/XML/1998/namespace'. Other prefixes must not be bound to this namespace name, and it must not be declared as the default namespace.", - "Argument_NamespaceDeclarationXmlns" : "The prefix 'xmlns' is bound to the namespace name 'http://www.w3.org/2000/xmlns/'. It must not be declared. Other prefixes must not be bound to this namespace name, and it must not be declared as the default namespace.", - "Argument_XObjectValue" : "An XObject cannot be used as a value.", - "InvalidOperation_DocumentStructure" : "This operation would create an incorrectly structured document.", - "InvalidOperation_DuplicateAttribute" : "Duplicate attribute.", - "InvalidOperation_ExpectedEndOfFile" : "The XmlReader state should be EndOfFile after this operation.", - "InvalidOperation_ExpectedInteractive" : "The XmlReader state should be Interactive.", - "InvalidOperation_ExpectedNodeType" : "The XmlReader must be on a node of type {0} instead of a node of type {1}.", - "InvalidOperation_ExternalCode" : "This operation was corrupted by external code.", - "InvalidOperation_MissingAncestor" : "A common ancestor is missing.", - "InvalidOperation_MissingParent" : "The parent is missing.", - "InvalidOperation_MissingRoot" : "The root element is missing.", - "InvalidOperation_UnexpectedNodeType" : "The XmlReader should not be on a node of type {0}.", - "InvalidOperation_UnresolvedEntityReference" : "The XmlReader cannot resolve entity references.", - "InvalidOperation_WriteAttribute" : "An attribute cannot be written after content.", - "NotSupported_WriteBase64" : "This XmlWriter does not support base64 encoded data.", - "NotSupported_WriteEntityRef" : "This XmlWriter does not support entity references." -} diff --git a/src/System.Xml.XDocument/Resources/Strings.Designer.cs b/src/System.Xml.XDocument/Resources/Strings.Designer.cs new file mode 100644 index 000000000000..e737624aceb0 --- /dev/null +++ b/src/System.Xml.XDocument/Resources/Strings.Designer.cs @@ -0,0 +1,298 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.35317 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Resources { + using System; + using System.Reflection; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Strings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Strings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("System.Xml.Resources.Strings", typeof(Strings).GetTypeInfo().Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to An attribute cannot be added to content.. + /// + internal static string Argument_AddAttribute { + get { + return ResourceManager.GetString("Argument_AddAttribute", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A node of type {0} cannot be added to content.. + /// + internal static string Argument_AddNode { + get { + return ResourceManager.GetString("Argument_AddNode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Non white space characters cannot be added to content.. + /// + internal static string Argument_AddNonWhitespace { + get { + return ResourceManager.GetString("Argument_AddNonWhitespace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The argument cannot be converted to a string.. + /// + internal static string Argument_ConvertToString { + get { + return ResourceManager.GetString("Argument_ConvertToString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is an invalid expanded name.. + /// + internal static string Argument_InvalidExpandedName { + get { + return ResourceManager.GetString("Argument_InvalidExpandedName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is an invalid name for a processing instruction.. + /// + internal static string Argument_InvalidPIName { + get { + return ResourceManager.GetString("Argument_InvalidPIName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is an invalid prefix.. + /// + internal static string Argument_InvalidPrefix { + get { + return ResourceManager.GetString("Argument_InvalidPrefix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The argument must be derived from {0}.. + /// + internal static string Argument_MustBeDerivedFrom { + get { + return ResourceManager.GetString("Argument_MustBeDerivedFrom", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The prefix '{0}' cannot be bound to the empty namespace name.. + /// + internal static string Argument_NamespaceDeclarationPrefixed { + get { + return ResourceManager.GetString("Argument_NamespaceDeclarationPrefixed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The prefix 'xml' is bound to the namespace name 'http://www.w3.org/XML/1998/namespace'. Other prefixes must not be bound to this namespace name, and it must not be declared as the default namespace.. + /// + internal static string Argument_NamespaceDeclarationXml { + get { + return ResourceManager.GetString("Argument_NamespaceDeclarationXml", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The prefix 'xmlns' is bound to the namespace name 'http://www.w3.org/2000/xmlns/'. It must not be declared. Other prefixes must not be bound to this namespace name, and it must not be declared as the default namespace.. + /// + internal static string Argument_NamespaceDeclarationXmlns { + get { + return ResourceManager.GetString("Argument_NamespaceDeclarationXmlns", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An XObject cannot be used as a value.. + /// + internal static string Argument_XObjectValue { + get { + return ResourceManager.GetString("Argument_XObjectValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This operation would create an incorrectly structured document.. + /// + internal static string InvalidOperation_DocumentStructure { + get { + return ResourceManager.GetString("InvalidOperation_DocumentStructure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Duplicate attribute.. + /// + internal static string InvalidOperation_DuplicateAttribute { + get { + return ResourceManager.GetString("InvalidOperation_DuplicateAttribute", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The XmlReader state should be EndOfFile after this operation.. + /// + internal static string InvalidOperation_ExpectedEndOfFile { + get { + return ResourceManager.GetString("InvalidOperation_ExpectedEndOfFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The XmlReader state should be Interactive.. + /// + internal static string InvalidOperation_ExpectedInteractive { + get { + return ResourceManager.GetString("InvalidOperation_ExpectedInteractive", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The XmlReader must be on a node of type {0} instead of a node of type {1}.. + /// + internal static string InvalidOperation_ExpectedNodeType { + get { + return ResourceManager.GetString("InvalidOperation_ExpectedNodeType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This operation was corrupted by external code.. + /// + internal static string InvalidOperation_ExternalCode { + get { + return ResourceManager.GetString("InvalidOperation_ExternalCode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A common ancestor is missing.. + /// + internal static string InvalidOperation_MissingAncestor { + get { + return ResourceManager.GetString("InvalidOperation_MissingAncestor", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parent is missing.. + /// + internal static string InvalidOperation_MissingParent { + get { + return ResourceManager.GetString("InvalidOperation_MissingParent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The root element is missing.. + /// + internal static string InvalidOperation_MissingRoot { + get { + return ResourceManager.GetString("InvalidOperation_MissingRoot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The XmlReader should not be on a node of type {0}.. + /// + internal static string InvalidOperation_UnexpectedNodeType { + get { + return ResourceManager.GetString("InvalidOperation_UnexpectedNodeType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The XmlReader cannot resolve entity references.. + /// + internal static string InvalidOperation_UnresolvedEntityReference { + get { + return ResourceManager.GetString("InvalidOperation_UnresolvedEntityReference", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An attribute cannot be written after content.. + /// + internal static string InvalidOperation_WriteAttribute { + get { + return ResourceManager.GetString("InvalidOperation_WriteAttribute", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This XmlWriter does not support base64 encoded data.. + /// + internal static string NotSupported_WriteBase64 { + get { + return ResourceManager.GetString("NotSupported_WriteBase64", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This XmlWriter does not support entity references.. + /// + internal static string NotSupported_WriteEntityRef { + get { + return ResourceManager.GetString("NotSupported_WriteEntityRef", resourceCulture); + } + } + } +} diff --git a/src/System.Xml.XDocument/Resources/Strings.resx b/src/System.Xml.XDocument/Resources/Strings.resx new file mode 100644 index 000000000000..26270468ad6f --- /dev/null +++ b/src/System.Xml.XDocument/Resources/Strings.resx @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + An attribute cannot be added to content. + + + A node of type {0} cannot be added to content. + + + Non white space characters cannot be added to content. + + + The argument cannot be converted to a string. + + + '{0}' is an invalid expanded name. + + + '{0}' is an invalid name for a processing instruction. + + + '{0}' is an invalid prefix. + + + The argument must be derived from {0}. + + + The prefix '{0}' cannot be bound to the empty namespace name. + + + The prefix 'xml' is bound to the namespace name 'http://www.w3.org/XML/1998/namespace'. Other prefixes must not be bound to this namespace name, and it must not be declared as the default namespace. + + + The prefix 'xmlns' is bound to the namespace name 'http://www.w3.org/2000/xmlns/'. It must not be declared. Other prefixes must not be bound to this namespace name, and it must not be declared as the default namespace. + + + An XObject cannot be used as a value. + + + This operation would create an incorrectly structured document. + + + Duplicate attribute. + + + The XmlReader state should be EndOfFile after this operation. + + + The XmlReader state should be Interactive. + + + The XmlReader must be on a node of type {0} instead of a node of type {1}. + + + This operation was corrupted by external code. + + + A common ancestor is missing. + + + The parent is missing. + + + The root element is missing. + + + The XmlReader should not be on a node of type {0}. + + + The XmlReader cannot resolve entity references. + + + An attribute cannot be written after content. + + + This XmlWriter does not support base64 encoded data. + + + This XmlWriter does not support entity references. + + \ No newline at end of file diff --git a/src/System.Xml.XDocument/System.Xml.XDocument.csproj b/src/System.Xml.XDocument/System.Xml.XDocument.csproj index 873582d64b15..31224f7182f7 100644 --- a/src/System.Xml.XDocument/System.Xml.XDocument.csproj +++ b/src/System.Xml.XDocument/System.Xml.XDocument.csproj @@ -1,4 +1,4 @@ - + @@ -37,10 +37,6 @@ en-US False - - - $(MSBuildThisFileDirectory)Res - true ;SILVERLIGHT;PROJECTN @@ -71,6 +67,11 @@ + + True + True + Strings.resx + @@ -78,5 +79,13 @@ + + + ResXFileCodeGenerator + Strings.Designer.cs + Resources + Designer + + \ No newline at end of file diff --git a/src/System.Xml.XPath.XDocument/Res/resources.resjson b/src/System.Xml.XPath.XDocument/Res/resources.resjson deleted file mode 100644 index 4ec8a6e3b2b4..000000000000 --- a/src/System.Xml.XPath.XDocument/Res/resources.resjson +++ /dev/null @@ -1,6 +0,0 @@ -{ - "Argument_CreateNavigator" : "This XPathNavigator cannot be created on a node of type {0}.", - "InvalidOperation_BadNodeType" : "This operation is not valid on a node of type {0}.", - "InvalidOperation_UnexpectedEvaluation" : "The XPath expression evaluated to unexpected type {0}.", - "NotSupported_MoveToId" : "This XPathNavigator does not support IDs." -} diff --git a/src/System.Xml.XPath.XDocument/Resources/Strings.Designer.cs b/src/System.Xml.XPath.XDocument/Resources/Strings.Designer.cs new file mode 100644 index 000000000000..e84039a42193 --- /dev/null +++ b/src/System.Xml.XPath.XDocument/Resources/Strings.Designer.cs @@ -0,0 +1,100 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.35317 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Resources { + using System; + using System.Reflection; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Strings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Strings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Resources.Strings", typeof(Strings).GetTypeInfo().Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to This XPathNavigator cannot be created on a node of type {0}.. + /// + internal static string Argument_CreateNavigator { + get { + return ResourceManager.GetString("Argument_CreateNavigator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This operation is not valid on a node of type {0}.. + /// + internal static string InvalidOperation_BadNodeType { + get { + return ResourceManager.GetString("InvalidOperation_BadNodeType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The XPath expression evaluated to unexpected type {0}.. + /// + internal static string InvalidOperation_UnexpectedEvaluation { + get { + return ResourceManager.GetString("InvalidOperation_UnexpectedEvaluation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This XPathNavigator does not support IDs.. + /// + internal static string NotSupported_MoveToId { + get { + return ResourceManager.GetString("NotSupported_MoveToId", resourceCulture); + } + } + } +} diff --git a/src/System.Xml.XPath.XDocument/Resources/Strings.resx b/src/System.Xml.XPath.XDocument/Resources/Strings.resx new file mode 100644 index 000000000000..26754887744a --- /dev/null +++ b/src/System.Xml.XPath.XDocument/Resources/Strings.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + This XPathNavigator cannot be created on a node of type {0}. + + + This operation is not valid on a node of type {0}. + + + The XPath expression evaluated to unexpected type {0}. + + + This XPathNavigator does not support IDs. + + \ No newline at end of file diff --git a/src/System.Xml.XPath.XDocument/System.Xml.XPath.XDocument.csproj b/src/System.Xml.XPath.XDocument/System.Xml.XPath.XDocument.csproj index d111a3805c75..d0db4f4d4a64 100644 --- a/src/System.Xml.XPath.XDocument/System.Xml.XPath.XDocument.csproj +++ b/src/System.Xml.XPath.XDocument/System.Xml.XPath.XDocument.csproj @@ -1,4 +1,4 @@ - + @@ -40,20 +40,25 @@ AnyCPU MinimumRecommendedRules.ruleset - - $(MSBuildThisFileDirectory)Res - + + + + + True + True + Strings.resx + @@ -74,5 +79,13 @@ System.Xml.XPath + + + ResXFileCodeGenerator + Strings.Designer.cs + Resources + Designer + + \ No newline at end of file diff --git a/src/System.Xml.XPath.XmlDocument/Res/resources.resjson b/src/System.Xml.XPath.XmlDocument/Res/resources.resjson deleted file mode 100644 index 04024098c8b8..000000000000 --- a/src/System.Xml.XPath.XmlDocument/Res/resources.resjson +++ /dev/null @@ -1,51 +0,0 @@ -{ - "Xml_InvalidOperation" : "Operation is not valid due to the current state of the object.", - "Xml_BadStartNameChar" : "Name cannot begin with the '{0}' character, hexadecimal value {1}.", - "Xml_BadNameChar" : "The '{0}' character, hexadecimal value {1}, cannot be included in a name.", - "XmlConvert_BadUri" : "The string was not recognized as a valid Uri.", - "XmlConvert_BadFormat" : "The string '{0}' is not a valid {1} value.", - "XmlConvert_Overflow" : "Value '{0}' was either too large or too small for {1}.", - "XmlConvert_TypeBadMapping" : "Xml type '{0}' does not support Clr type '{1}'.", - "XmlConvert_TypeBadMapping2" : "Xml type '{0}' does not support a conversion from Clr type '{1}' to Clr type '{2}'.", - "XmlConvert_TypeListBadMapping" : "Xml type 'List of {0}' does not support Clr type '{1}'.", - "XmlConvert_TypeListBadMapping2" : "Xml type 'List of {0}' does not support a conversion from Clr type '{1}' to Clr type '{2}'.", - "XmlConvert_TypeToString" : "Xml type '{0}' cannot convert from Clr type '{1}' unless the destination type is String or XmlAtomicValue.", - "XmlConvert_TypeFromString" : "Xml type '{0}' cannot convert to Clr type '{1}' unless the source value is a String or an XmlAtomicValue.", - "XmlConvert_TypeNoPrefix" : "The QName '{0}' cannot be represented as a String. A prefix for namespace '{1}' cannot be found.", - "XmlConvert_TypeNoNamespace" : "The String '{0}' cannot be represented as an XmlQualifiedName. A namespace for prefix '{1}' cannot be found.", - "XmlConvert_NotOneCharString" : "String must be exactly one character long.", - "Xml_ErrorPosition" : "Line {0}, position {1}.", - "Xml_InvalidReadContentAs" : "The {0} method is not supported on node type {1}. If you want to read typed content of an element, use the ReadElementContentAs method.", - "Xml_InvalidReadElementContentAs" : "The {0} method is not supported on node type {1}.", - "Xdom_Node_Modify_ReadOnly" : "This node is read-only. It cannot be modified.", - "Xpn_MissingParent" : "The current position of the navigator is missing a valid parent.", - "Xpn_BadPosition" : "Operation is not valid due to the current position of the navigator.", - "Xml_EmptyName" : "The empty string '' is not a valid name.", - "Xpn_NoContent" : "No content generated as the result of the operation.", - "Xml_ClosedOrError" : "The Writer is closed or in error state.", - "Xml_InvalidSurrogatePairWithArgs" : "The surrogate pair (0x{0}, 0x{1}) is invalid. A high surrogate character (0xD800 - 0xDBFF) must always be paired with a low surrogate character (0xDC00 - 0xDFFF).", - "Xml_InvalidSurrogateHighChar" : "Invalid high surrogate character (0x{0}). A high surrogate character must have a value from range (0xD800 - 0xDBFF).", - "Xml_InvalidSurrogateMissingLowChar" : "The surrogate pair is invalid. Missing a low surrogate character.", - "Xml_InvalidCharacter" : "'{0}', hexadecimal value {1}, is an invalid character.", - "Xml_DupAttributeName" : "'{0}' is a duplicate attribute name.", - "Xml_NoRoot" : "Document does not have a root element.", - "Xml_DtdNotAllowedInFragment" : "DTD is not allowed in XML fragments.", - "Xml_DtdAlreadyWritten" : "The DTD has already been written out.", - "Xml_EmptyLocalName" : "The empty string '' is not a valid local name.", - "Xml_PrefixForEmptyNs" : "Cannot use a prefix with an empty namespace.", - "Xml_NoStartTag" : "There was no XML start tag open.", - "Xml_XmlnsPrefix" : "Prefix \"xmlns\" is reserved for use by XML.", - "Xml_XmlPrefix" : "Prefix \"xml\" is reserved for use by XML and can be mapped only to namespace name \"http://www.w3.org/XML/1998/namespace\".", - "Xml_CanNotBindToReservedNamespace" : "Cannot bind to the reserved namespace.", - "Xml_InvalidXmlSpace" : "'{0}' is an invalid xml:space value.", - "Xml_DupXmlDecl" : "Cannot write XML declaration. WriteStartDocument method has already written it.", - "Xml_CannotWriteXmlDecl" : "Cannot write XML declaration. XML declaration can be only at the beginning of the document.", - "Xml_NonWhitespace" : "Only white space characters should be used.", - "Xml_UndefNamespace" : "The '{0}' namespace is not defined.", - "Xml_CannotStartDocumentOnFragment" : "WriteStartDocument cannot be called on writers created with ConformanceLevel.Fragment.", - "Xml_RedefinePrefix" : "The prefix '{0}' cannot be redefined from '{1}' to '{2}' within the same start element tag.", - "Xml_NamespaceDeclXmlXmlns" : "Prefix '{0}' cannot be mapped to namespace name reserved for \"xml\" or \"xmlns\".", - "Xml_WrongToken" : "Token {0} in state {1} would result in an invalid XML document.", - "Xml_InvalidNameCharsDetail" : "Invalid name character in '{0}'. The '{1}' character, hexadecimal value {2}, cannot be included in a name.", - "Xml_ConformanceLevelFragment" : "Make sure that the ConformanceLevel setting is set to ConformanceLevel.Fragment or ConformanceLevel.Auto if you want to write an XML fragment." -} diff --git a/src/System.Xml.XPath.XmlDocument/Resources/Strings.Designer.cs b/src/System.Xml.XPath.XmlDocument/Resources/Strings.Designer.cs new file mode 100644 index 000000000000..2c2660ddcd3f --- /dev/null +++ b/src/System.Xml.XPath.XmlDocument/Resources/Strings.Designer.cs @@ -0,0 +1,505 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.35317 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Resources { + using System; + using System.Reflection; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Strings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Strings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Resources.Strings", typeof(Strings).GetTypeInfo().Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to This node is read-only. It cannot be modified.. + /// + internal static string Xdom_Node_Modify_ReadOnly { + get { + return ResourceManager.GetString("Xdom_Node_Modify_ReadOnly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' character, hexadecimal value {1}, cannot be included in a name.. + /// + internal static string Xml_BadNameChar { + get { + return ResourceManager.GetString("Xml_BadNameChar", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Name cannot begin with the '{0}' character, hexadecimal value {1}.. + /// + internal static string Xml_BadStartNameChar { + get { + return ResourceManager.GetString("Xml_BadStartNameChar", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot bind to the reserved namespace.. + /// + internal static string Xml_CanNotBindToReservedNamespace { + get { + return ResourceManager.GetString("Xml_CanNotBindToReservedNamespace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WriteStartDocument cannot be called on writers created with ConformanceLevel.Fragment.. + /// + internal static string Xml_CannotStartDocumentOnFragment { + get { + return ResourceManager.GetString("Xml_CannotStartDocumentOnFragment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot write XML declaration. XML declaration can be only at the beginning of the document.. + /// + internal static string Xml_CannotWriteXmlDecl { + get { + return ResourceManager.GetString("Xml_CannotWriteXmlDecl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Writer is closed or in error state.. + /// + internal static string Xml_ClosedOrError { + get { + return ResourceManager.GetString("Xml_ClosedOrError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Make sure that the ConformanceLevel setting is set to ConformanceLevel.Fragment or ConformanceLevel.Auto if you want to write an XML fragment.. + /// + internal static string Xml_ConformanceLevelFragment { + get { + return ResourceManager.GetString("Xml_ConformanceLevelFragment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The DTD has already been written out.. + /// + internal static string Xml_DtdAlreadyWritten { + get { + return ResourceManager.GetString("Xml_DtdAlreadyWritten", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DTD is not allowed in XML fragments.. + /// + internal static string Xml_DtdNotAllowedInFragment { + get { + return ResourceManager.GetString("Xml_DtdNotAllowedInFragment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is a duplicate attribute name.. + /// + internal static string Xml_DupAttributeName { + get { + return ResourceManager.GetString("Xml_DupAttributeName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot write XML declaration. WriteStartDocument method has already written it.. + /// + internal static string Xml_DupXmlDecl { + get { + return ResourceManager.GetString("Xml_DupXmlDecl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The empty string '' is not a valid local name.. + /// + internal static string Xml_EmptyLocalName { + get { + return ResourceManager.GetString("Xml_EmptyLocalName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The empty string '' is not a valid name.. + /// + internal static string Xml_EmptyName { + get { + return ResourceManager.GetString("Xml_EmptyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Line {0}, position {1}.. + /// + internal static string Xml_ErrorPosition { + get { + return ResourceManager.GetString("Xml_ErrorPosition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}', hexadecimal value {1}, is an invalid character.. + /// + internal static string Xml_InvalidCharacter { + get { + return ResourceManager.GetString("Xml_InvalidCharacter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid name character in '{0}'. The '{1}' character, hexadecimal value {2}, cannot be included in a name.. + /// + internal static string Xml_InvalidNameCharsDetail { + get { + return ResourceManager.GetString("Xml_InvalidNameCharsDetail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation is not valid due to the current state of the object.. + /// + internal static string Xml_InvalidOperation { + get { + return ResourceManager.GetString("Xml_InvalidOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} method is not supported on node type {1}. If you want to read typed content of an element, use the ReadElementContentAs method.. + /// + internal static string Xml_InvalidReadContentAs { + get { + return ResourceManager.GetString("Xml_InvalidReadContentAs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} method is not supported on node type {1}.. + /// + internal static string Xml_InvalidReadElementContentAs { + get { + return ResourceManager.GetString("Xml_InvalidReadElementContentAs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid high surrogate character (0x{0}). A high surrogate character must have a value from range (0xD800 - 0xDBFF).. + /// + internal static string Xml_InvalidSurrogateHighChar { + get { + return ResourceManager.GetString("Xml_InvalidSurrogateHighChar", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The surrogate pair is invalid. Missing a low surrogate character.. + /// + internal static string Xml_InvalidSurrogateMissingLowChar { + get { + return ResourceManager.GetString("Xml_InvalidSurrogateMissingLowChar", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The surrogate pair (0x{0}, 0x{1}) is invalid. A high surrogate character (0xD800 - 0xDBFF) must always be paired with a low surrogate character (0xDC00 - 0xDFFF).. + /// + internal static string Xml_InvalidSurrogatePairWithArgs { + get { + return ResourceManager.GetString("Xml_InvalidSurrogatePairWithArgs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is an invalid xml:space value.. + /// + internal static string Xml_InvalidXmlSpace { + get { + return ResourceManager.GetString("Xml_InvalidXmlSpace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Prefix '{0}' cannot be mapped to namespace name reserved for "xml" or "xmlns".. + /// + internal static string Xml_NamespaceDeclXmlXmlns { + get { + return ResourceManager.GetString("Xml_NamespaceDeclXmlXmlns", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Only white space characters should be used.. + /// + internal static string Xml_NonWhitespace { + get { + return ResourceManager.GetString("Xml_NonWhitespace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Document does not have a root element.. + /// + internal static string Xml_NoRoot { + get { + return ResourceManager.GetString("Xml_NoRoot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was no XML start tag open.. + /// + internal static string Xml_NoStartTag { + get { + return ResourceManager.GetString("Xml_NoStartTag", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot use a prefix with an empty namespace.. + /// + internal static string Xml_PrefixForEmptyNs { + get { + return ResourceManager.GetString("Xml_PrefixForEmptyNs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The prefix '{0}' cannot be redefined from '{1}' to '{2}' within the same start element tag.. + /// + internal static string Xml_RedefinePrefix { + get { + return ResourceManager.GetString("Xml_RedefinePrefix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' namespace is not defined.. + /// + internal static string Xml_UndefNamespace { + get { + return ResourceManager.GetString("Xml_UndefNamespace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Token {0} in state {1} would result in an invalid XML document.. + /// + internal static string Xml_WrongToken { + get { + return ResourceManager.GetString("Xml_WrongToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Prefix "xmlns" is reserved for use by XML.. + /// + internal static string Xml_XmlnsPrefix { + get { + return ResourceManager.GetString("Xml_XmlnsPrefix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Prefix "xml" is reserved for use by XML and can be mapped only to namespace name "http://www.w3.org/XML/1998/namespace".. + /// + internal static string Xml_XmlPrefix { + get { + return ResourceManager.GetString("Xml_XmlPrefix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The string '{0}' is not a valid {1} value.. + /// + internal static string XmlConvert_BadFormat { + get { + return ResourceManager.GetString("XmlConvert_BadFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The string was not recognized as a valid Uri.. + /// + internal static string XmlConvert_BadUri { + get { + return ResourceManager.GetString("XmlConvert_BadUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to String must be exactly one character long.. + /// + internal static string XmlConvert_NotOneCharString { + get { + return ResourceManager.GetString("XmlConvert_NotOneCharString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Value '{0}' was either too large or too small for {1}.. + /// + internal static string XmlConvert_Overflow { + get { + return ResourceManager.GetString("XmlConvert_Overflow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Xml type '{0}' does not support Clr type '{1}'.. + /// + internal static string XmlConvert_TypeBadMapping { + get { + return ResourceManager.GetString("XmlConvert_TypeBadMapping", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Xml type '{0}' does not support a conversion from Clr type '{1}' to Clr type '{2}'.. + /// + internal static string XmlConvert_TypeBadMapping2 { + get { + return ResourceManager.GetString("XmlConvert_TypeBadMapping2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Xml type '{0}' cannot convert to Clr type '{1}' unless the source value is a String or an XmlAtomicValue.. + /// + internal static string XmlConvert_TypeFromString { + get { + return ResourceManager.GetString("XmlConvert_TypeFromString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Xml type 'List of {0}' does not support Clr type '{1}'.. + /// + internal static string XmlConvert_TypeListBadMapping { + get { + return ResourceManager.GetString("XmlConvert_TypeListBadMapping", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Xml type 'List of {0}' does not support a conversion from Clr type '{1}' to Clr type '{2}'.. + /// + internal static string XmlConvert_TypeListBadMapping2 { + get { + return ResourceManager.GetString("XmlConvert_TypeListBadMapping2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The String '{0}' cannot be represented as an XmlQualifiedName. A namespace for prefix '{1}' cannot be found.. + /// + internal static string XmlConvert_TypeNoNamespace { + get { + return ResourceManager.GetString("XmlConvert_TypeNoNamespace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The QName '{0}' cannot be represented as a String. A prefix for namespace '{1}' cannot be found.. + /// + internal static string XmlConvert_TypeNoPrefix { + get { + return ResourceManager.GetString("XmlConvert_TypeNoPrefix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Xml type '{0}' cannot convert from Clr type '{1}' unless the destination type is String or XmlAtomicValue.. + /// + internal static string XmlConvert_TypeToString { + get { + return ResourceManager.GetString("XmlConvert_TypeToString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation is not valid due to the current position of the navigator.. + /// + internal static string Xpn_BadPosition { + get { + return ResourceManager.GetString("Xpn_BadPosition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The current position of the navigator is missing a valid parent.. + /// + internal static string Xpn_MissingParent { + get { + return ResourceManager.GetString("Xpn_MissingParent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No content generated as the result of the operation.. + /// + internal static string Xpn_NoContent { + get { + return ResourceManager.GetString("Xpn_NoContent", resourceCulture); + } + } + } +} diff --git a/src/System.Xml.XPath.XmlDocument/Resources/Strings.resx b/src/System.Xml.XPath.XmlDocument/Resources/Strings.resx new file mode 100644 index 000000000000..af9444204917 --- /dev/null +++ b/src/System.Xml.XPath.XmlDocument/Resources/Strings.resx @@ -0,0 +1,267 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + This node is read-only. It cannot be modified. + + + The '{0}' character, hexadecimal value {1}, cannot be included in a name. + + + Name cannot begin with the '{0}' character, hexadecimal value {1}. + + + Cannot bind to the reserved namespace. + + + WriteStartDocument cannot be called on writers created with ConformanceLevel.Fragment. + + + Cannot write XML declaration. XML declaration can be only at the beginning of the document. + + + The Writer is closed or in error state. + + + Make sure that the ConformanceLevel setting is set to ConformanceLevel.Fragment or ConformanceLevel.Auto if you want to write an XML fragment. + + + The DTD has already been written out. + + + DTD is not allowed in XML fragments. + + + '{0}' is a duplicate attribute name. + + + Cannot write XML declaration. WriteStartDocument method has already written it. + + + The empty string '' is not a valid local name. + + + The empty string '' is not a valid name. + + + Line {0}, position {1}. + + + '{0}', hexadecimal value {1}, is an invalid character. + + + Invalid name character in '{0}'. The '{1}' character, hexadecimal value {2}, cannot be included in a name. + + + Operation is not valid due to the current state of the object. + + + The {0} method is not supported on node type {1}. If you want to read typed content of an element, use the ReadElementContentAs method. + + + The {0} method is not supported on node type {1}. + + + Invalid high surrogate character (0x{0}). A high surrogate character must have a value from range (0xD800 - 0xDBFF). + + + The surrogate pair is invalid. Missing a low surrogate character. + + + The surrogate pair (0x{0}, 0x{1}) is invalid. A high surrogate character (0xD800 - 0xDBFF) must always be paired with a low surrogate character (0xDC00 - 0xDFFF). + + + '{0}' is an invalid xml:space value. + + + Prefix '{0}' cannot be mapped to namespace name reserved for "xml" or "xmlns". + + + Only white space characters should be used. + + + Document does not have a root element. + + + There was no XML start tag open. + + + Cannot use a prefix with an empty namespace. + + + The prefix '{0}' cannot be redefined from '{1}' to '{2}' within the same start element tag. + + + The '{0}' namespace is not defined. + + + Token {0} in state {1} would result in an invalid XML document. + + + Prefix "xmlns" is reserved for use by XML. + + + Prefix "xml" is reserved for use by XML and can be mapped only to namespace name "http://www.w3.org/XML/1998/namespace". + + + The string '{0}' is not a valid {1} value. + + + The string was not recognized as a valid Uri. + + + String must be exactly one character long. + + + Value '{0}' was either too large or too small for {1}. + + + Xml type '{0}' does not support Clr type '{1}'. + + + Xml type '{0}' does not support a conversion from Clr type '{1}' to Clr type '{2}'. + + + Xml type '{0}' cannot convert to Clr type '{1}' unless the source value is a String or an XmlAtomicValue. + + + Xml type 'List of {0}' does not support Clr type '{1}'. + + + Xml type 'List of {0}' does not support a conversion from Clr type '{1}' to Clr type '{2}'. + + + The String '{0}' cannot be represented as an XmlQualifiedName. A namespace for prefix '{1}' cannot be found. + + + The QName '{0}' cannot be represented as a String. A prefix for namespace '{1}' cannot be found. + + + Xml type '{0}' cannot convert from Clr type '{1}' unless the destination type is String or XmlAtomicValue. + + + Operation is not valid due to the current position of the navigator. + + + The current position of the navigator is missing a valid parent. + + + No content generated as the result of the operation. + + \ No newline at end of file diff --git a/src/System.Xml.XPath.XmlDocument/System.Xml.XPath.XmlDocument.csproj b/src/System.Xml.XPath.XmlDocument/System.Xml.XPath.XmlDocument.csproj index f7ec4af5df92..d708816826c3 100644 --- a/src/System.Xml.XPath.XmlDocument/System.Xml.XPath.XmlDocument.csproj +++ b/src/System.Xml.XPath.XmlDocument/System.Xml.XPath.XmlDocument.csproj @@ -1,4 +1,4 @@ - + @@ -40,15 +40,14 @@ AnyCPU MinimumRecommendedRules.ruleset - - $(MSBuildThisFileDirectory)Res - + + @@ -74,6 +73,11 @@ + + True + True + Strings.resx + @@ -100,5 +104,12 @@ System.Xml.XPath + + + ResXFileCodeGenerator + Strings.Designer.cs + Resources + + \ No newline at end of file diff --git a/src/System.Xml.XPath/Res/resources.resjson b/src/System.Xml.XPath/Res/resources.resjson deleted file mode 100644 index fae1cb3a6896..000000000000 --- a/src/System.Xml.XPath/Res/resources.resjson +++ /dev/null @@ -1,59 +0,0 @@ -{ - "Sch_EnumFinished" : "Enumeration has already finished.", - "Sch_EnumNotStarted" : "Enumeration has not started. Call MoveNext.", - "Xpn_BadPosition" : "Operation is not valid due to the current position of the navigator.", - "Xp_NodeSetExpected" : "Expression must evaluate to a node-set.", - "Xp_InvalidPattern" : "'{0}' is an invalid XSLT pattern.", - "Xp_NoContext" : "Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.", - "Xp_BadQueryObject" : "This is an invalid object. Only objects returned from Compile() can be passed as input.", - "Xml_InvalidOperation" : "Operation is not valid due to the current state of the object.", - "Xp_QueryTooComplex" : "The xpath query is too complex.", - "Xp_InvalidKeyPattern" : "'{0}' is an invalid key pattern. It either contains a variable reference or 'key()' function.", - "Xp_NotSupported" : "The XPath query '{0}' is not supported.", - "Xp_CurrentNotAllowed" : "The 'current()' function cannot be used in a pattern.", - "Xp_InvalidToken" : "'{0}' has an invalid token.", - "Xp_InvalidNumArgs" : "Function '{0}' in '{1}' has an invalid number of arguments.", - "Xp_InvalidArgumentType" : "The argument to function '{0}' in '{1}' cannot be converted to a node-set.", - "Xp_UnclosedString" : "This is an unclosed string.", - "Xp_ExprExpected" : "'{0}' is an invalid expression.", - "Xp_InvalidName" : "'{0}' has an invalid qualified name.", - "Xp_UndefFunc" : "The function '{0}()' is undefined.", - "XmlUndefinedAlias" : "Namespace prefix '{0}' is not defined.", - "Xp_UndefinedXsltContext" : "XsltContext is needed for this query because of an unknown function.", - "Xp_UndefVar" : "The variable '{0}' is undefined.", - "Xp_FunctionFailed" : "Function '{0}()' has failed.", - "Xml_EmptyName" : "The empty string '' is not a valid name.", - "Xml_BadStartNameChar" : "Name cannot begin with the '{0}' character, hexadecimal value {1}.", - "Xml_BadNameChar" : "The '{0}' character, hexadecimal value {1}, cannot be included in a name.", - "Xdom_Empty_LocalName" : "The local name for elements or attributes cannot be null or an empty string.", - "XmlBadName" : "A node of type '{0}' cannot have the name '{1}'.", - "Xml_InvalidPIName" : "'{0}' is an invalid name for processing instructions.", - "XmlNoNameAllowed" : "A node of type '{0}' cannot have a name.", - "Xml_PrefixForEmptyNs" : "Cannot use a prefix with an empty namespace.", - "Xml_XmlPrefix" : "Prefix \"xml\" is reserved for use by XML and can be mapped only to namespace name \"http://www.w3.org/XML/1998/namespace\".", - "Xml_XmlnsPrefix" : "Prefix \"xmlns\" is reserved for use by XML.", - "Xml_NamespaceDeclXmlXmlns" : "Prefix '{0}' cannot be mapped to namespace name reserved for \"xml\" or \"xmlns\".", - "Xml_InvalidBase64Value" : "'{0}' is not a valid Base64 text sequence.", - "Xml_InvalidBinHexValueOddCount" : "'{0}' is not a valid BinHex text sequence. The sequence must contain an even number of characters.", - "Xml_MixingBinaryContentMethods" : "ReadContentAsBase64 and ReadContentAsBinHex method calls cannot be mixed with calls to ReadElementContentAsBase64 and ReadElementContentAsBinHex.", - "Xml_InvalidNodeType" : "'{0}' is an invalid XmlNodeType.", - "Xml_InvalidBinHexValue" : "'{0}' is not a valid BinHex text sequence.", - "XmlConvert_BadFormat" : "The string '{0}' is not a valid {1} value.", - "Sch_XsdDateTimeCompare" : "Cannot compare '{0}' and '{1}'.", - "XmlConvert_TypeNoPrefix" : "The QName '{0}' cannot be represented as a String. A prefix for namespace '{1}' cannot be found.", - "XmlConvert_Overflow" : "Value '{0}' was either too large or too small for {1}.", - "XmlConvert_TypeListBadMapping" : "Xml type 'List of {0}' does not support Clr type '{1}'.", - "XmlConvert_TypeListBadMapping2" : "Xml type 'List of {0}' does not support a conversion from Clr type '{1}' to Clr type '{2}'.", - "Xml_ErrorPosition" : "Line {0}, position {1}.", - "Xml_InvalidReadContentAs" : "The {0} method is not supported on node type {1}. If you want to read typed content of an element, use the ReadElementContentAs method.", - "Xml_InvalidReadElementContentAs" : "The {0} method is not supported on node type {1}.", - "XmlConvert_TypeNoNamespace" : "The String '{0}' cannot be represented as an XmlQualifiedName. A namespace for prefix '{1}' cannot be found.", - "Xml_MessageWithErrorPosition" : "{0} Line {1}, position {2}.", - "XmlConvert_TypeToString" : "Cannot convert type '{0}' to String.", - "XmlConvert_TypeFromString" : "Cannot String to '{1}'.", - "Xml_InvalidSurrogatePairWithArgs" : "The surrogate pair (0x{0}, 0x{1}) is invalid. A high surrogate character (0xD800 - 0xDBFF) must always be paired with a low surrogate character (0xDC00 - 0xDFFF).", - "Xml_InvalidSurrogateHighChar" : "Invalid high surrogate character (0x{0}). A high surrogate character must have a value from range (0xD800 - 0xDBFF).", - "Xml_InvalidCharacter" : "'{0}', hexadecimal value {1}, is an invalid character.", - "Xml_InvalidSurrogateMissingLowChar" : "The surrogate pair is invalid. Missing a low surrogate character.", - "Xml_UnknownResourceString" : "Unknown resource string: {0}." -} diff --git a/src/System.Xml.XPath/Resources/Strings.Designer.cs b/src/System.Xml.XPath/Resources/Strings.Designer.cs new file mode 100644 index 000000000000..d8543eaee348 --- /dev/null +++ b/src/System.Xml.XPath/Resources/Strings.Designer.cs @@ -0,0 +1,577 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.35317 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Resources { + using System; + using System.Reflection; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Strings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Strings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Resources.Strings", typeof(Strings).GetTypeInfo().Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Enumeration has already finished.. + /// + internal static string Sch_EnumFinished { + get { + return ResourceManager.GetString("Sch_EnumFinished", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enumeration has not started. Call MoveNext.. + /// + internal static string Sch_EnumNotStarted { + get { + return ResourceManager.GetString("Sch_EnumNotStarted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot compare '{0}' and '{1}'.. + /// + internal static string Sch_XsdDateTimeCompare { + get { + return ResourceManager.GetString("Sch_XsdDateTimeCompare", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The local name for elements or attributes cannot be null or an empty string.. + /// + internal static string Xdom_Empty_LocalName { + get { + return ResourceManager.GetString("Xdom_Empty_LocalName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' character, hexadecimal value {1}, cannot be included in a name.. + /// + internal static string Xml_BadNameChar { + get { + return ResourceManager.GetString("Xml_BadNameChar", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Name cannot begin with the '{0}' character, hexadecimal value {1}.. + /// + internal static string Xml_BadStartNameChar { + get { + return ResourceManager.GetString("Xml_BadStartNameChar", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The empty string '' is not a valid name.. + /// + internal static string Xml_EmptyName { + get { + return ResourceManager.GetString("Xml_EmptyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Line {0}, position {1}.. + /// + internal static string Xml_ErrorPosition { + get { + return ResourceManager.GetString("Xml_ErrorPosition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is not a valid Base64 text sequence.. + /// + internal static string Xml_InvalidBase64Value { + get { + return ResourceManager.GetString("Xml_InvalidBase64Value", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is not a valid BinHex text sequence.. + /// + internal static string Xml_InvalidBinHexValue { + get { + return ResourceManager.GetString("Xml_InvalidBinHexValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is not a valid BinHex text sequence. The sequence must contain an even number of characters.. + /// + internal static string Xml_InvalidBinHexValueOddCount { + get { + return ResourceManager.GetString("Xml_InvalidBinHexValueOddCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}', hexadecimal value {1}, is an invalid character.. + /// + internal static string Xml_InvalidCharacter { + get { + return ResourceManager.GetString("Xml_InvalidCharacter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is an invalid XmlNodeType.. + /// + internal static string Xml_InvalidNodeType { + get { + return ResourceManager.GetString("Xml_InvalidNodeType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation is not valid due to the current state of the object.. + /// + internal static string Xml_InvalidOperation { + get { + return ResourceManager.GetString("Xml_InvalidOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is an invalid name for processing instructions.. + /// + internal static string Xml_InvalidPIName { + get { + return ResourceManager.GetString("Xml_InvalidPIName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} method is not supported on node type {1}. If you want to read typed content of an element, use the ReadElementContentAs method.. + /// + internal static string Xml_InvalidReadContentAs { + get { + return ResourceManager.GetString("Xml_InvalidReadContentAs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} method is not supported on node type {1}.. + /// + internal static string Xml_InvalidReadElementContentAs { + get { + return ResourceManager.GetString("Xml_InvalidReadElementContentAs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid high surrogate character (0x{0}). A high surrogate character must have a value from range (0xD800 - 0xDBFF).. + /// + internal static string Xml_InvalidSurrogateHighChar { + get { + return ResourceManager.GetString("Xml_InvalidSurrogateHighChar", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The surrogate pair is invalid. Missing a low surrogate character.. + /// + internal static string Xml_InvalidSurrogateMissingLowChar { + get { + return ResourceManager.GetString("Xml_InvalidSurrogateMissingLowChar", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The surrogate pair (0x{0}, 0x{1}) is invalid. A high surrogate character (0xD800 - 0xDBFF) must always be paired with a low surrogate character (0xDC00 - 0xDFFF).. + /// + internal static string Xml_InvalidSurrogatePairWithArgs { + get { + return ResourceManager.GetString("Xml_InvalidSurrogatePairWithArgs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} Line {1}, position {2}.. + /// + internal static string Xml_MessageWithErrorPosition { + get { + return ResourceManager.GetString("Xml_MessageWithErrorPosition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ReadContentAsBase64 and ReadContentAsBinHex method calls cannot be mixed with calls to ReadElementContentAsBase64 and ReadElementContentAsBinHex.. + /// + internal static string Xml_MixingBinaryContentMethods { + get { + return ResourceManager.GetString("Xml_MixingBinaryContentMethods", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Prefix '{0}' cannot be mapped to namespace name reserved for "xml" or "xmlns".. + /// + internal static string Xml_NamespaceDeclXmlXmlns { + get { + return ResourceManager.GetString("Xml_NamespaceDeclXmlXmlns", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot use a prefix with an empty namespace.. + /// + internal static string Xml_PrefixForEmptyNs { + get { + return ResourceManager.GetString("Xml_PrefixForEmptyNs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unknown resource string: {0}.. + /// + internal static string Xml_UnknownResourceString { + get { + return ResourceManager.GetString("Xml_UnknownResourceString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Prefix "xmlns" is reserved for use by XML.. + /// + internal static string Xml_XmlnsPrefix { + get { + return ResourceManager.GetString("Xml_XmlnsPrefix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Prefix "xml" is reserved for use by XML and can be mapped only to namespace name "http://www.w3.org/XML/1998/namespace".. + /// + internal static string Xml_XmlPrefix { + get { + return ResourceManager.GetString("Xml_XmlPrefix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A node of type '{0}' cannot have the name '{1}'.. + /// + internal static string XmlBadName { + get { + return ResourceManager.GetString("XmlBadName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The string '{0}' is not a valid {1} value.. + /// + internal static string XmlConvert_BadFormat { + get { + return ResourceManager.GetString("XmlConvert_BadFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Value '{0}' was either too large or too small for {1}.. + /// + internal static string XmlConvert_Overflow { + get { + return ResourceManager.GetString("XmlConvert_Overflow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot String to '{1}'.. + /// + internal static string XmlConvert_TypeFromString { + get { + return ResourceManager.GetString("XmlConvert_TypeFromString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Xml type 'List of {0}' does not support Clr type '{1}'.. + /// + internal static string XmlConvert_TypeListBadMapping { + get { + return ResourceManager.GetString("XmlConvert_TypeListBadMapping", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Xml type 'List of {0}' does not support a conversion from Clr type '{1}' to Clr type '{2}'.. + /// + internal static string XmlConvert_TypeListBadMapping2 { + get { + return ResourceManager.GetString("XmlConvert_TypeListBadMapping2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The String '{0}' cannot be represented as an XmlQualifiedName. A namespace for prefix '{1}' cannot be found.. + /// + internal static string XmlConvert_TypeNoNamespace { + get { + return ResourceManager.GetString("XmlConvert_TypeNoNamespace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The QName '{0}' cannot be represented as a String. A prefix for namespace '{1}' cannot be found.. + /// + internal static string XmlConvert_TypeNoPrefix { + get { + return ResourceManager.GetString("XmlConvert_TypeNoPrefix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot convert type '{0}' to String.. + /// + internal static string XmlConvert_TypeToString { + get { + return ResourceManager.GetString("XmlConvert_TypeToString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A node of type '{0}' cannot have a name.. + /// + internal static string XmlNoNameAllowed { + get { + return ResourceManager.GetString("XmlNoNameAllowed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Namespace prefix '{0}' is not defined.. + /// + internal static string XmlUndefinedAlias { + get { + return ResourceManager.GetString("XmlUndefinedAlias", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This is an invalid object. Only objects returned from Compile() can be passed as input.. + /// + internal static string Xp_BadQueryObject { + get { + return ResourceManager.GetString("Xp_BadQueryObject", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The 'current()' function cannot be used in a pattern.. + /// + internal static string Xp_CurrentNotAllowed { + get { + return ResourceManager.GetString("Xp_CurrentNotAllowed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is an invalid expression.. + /// + internal static string Xp_ExprExpected { + get { + return ResourceManager.GetString("Xp_ExprExpected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Function '{0}()' has failed.. + /// + internal static string Xp_FunctionFailed { + get { + return ResourceManager.GetString("Xp_FunctionFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The argument to function '{0}' in '{1}' cannot be converted to a node-set.. + /// + internal static string Xp_InvalidArgumentType { + get { + return ResourceManager.GetString("Xp_InvalidArgumentType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is an invalid key pattern. It either contains a variable reference or 'key()' function.. + /// + internal static string Xp_InvalidKeyPattern { + get { + return ResourceManager.GetString("Xp_InvalidKeyPattern", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' has an invalid qualified name.. + /// + internal static string Xp_InvalidName { + get { + return ResourceManager.GetString("Xp_InvalidName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Function '{0}' in '{1}' has an invalid number of arguments.. + /// + internal static string Xp_InvalidNumArgs { + get { + return ResourceManager.GetString("Xp_InvalidNumArgs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is an invalid XSLT pattern.. + /// + internal static string Xp_InvalidPattern { + get { + return ResourceManager.GetString("Xp_InvalidPattern", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' has an invalid token.. + /// + internal static string Xp_InvalidToken { + get { + return ResourceManager.GetString("Xp_InvalidToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.. + /// + internal static string Xp_NoContext { + get { + return ResourceManager.GetString("Xp_NoContext", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Expression must evaluate to a node-set.. + /// + internal static string Xp_NodeSetExpected { + get { + return ResourceManager.GetString("Xp_NodeSetExpected", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The XPath query '{0}' is not supported.. + /// + internal static string Xp_NotSupported { + get { + return ResourceManager.GetString("Xp_NotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The xpath query is too complex.. + /// + internal static string Xp_QueryTooComplex { + get { + return ResourceManager.GetString("Xp_QueryTooComplex", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This is an unclosed string.. + /// + internal static string Xp_UnclosedString { + get { + return ResourceManager.GetString("Xp_UnclosedString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The function '{0}()' is undefined.. + /// + internal static string Xp_UndefFunc { + get { + return ResourceManager.GetString("Xp_UndefFunc", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to XsltContext is needed for this query because of an unknown function.. + /// + internal static string Xp_UndefinedXsltContext { + get { + return ResourceManager.GetString("Xp_UndefinedXsltContext", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The variable '{0}' is undefined.. + /// + internal static string Xp_UndefVar { + get { + return ResourceManager.GetString("Xp_UndefVar", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation is not valid due to the current position of the navigator.. + /// + internal static string Xpn_BadPosition { + get { + return ResourceManager.GetString("Xpn_BadPosition", resourceCulture); + } + } + } +} diff --git a/src/System.Xml.XPath/Resources/Strings.resx b/src/System.Xml.XPath/Resources/Strings.resx new file mode 100644 index 000000000000..81331fafcaed --- /dev/null +++ b/src/System.Xml.XPath/Resources/Strings.resx @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Enumeration has already finished. + + + Enumeration has not started. Call MoveNext. + + + Cannot compare '{0}' and '{1}'. + + + The local name for elements or attributes cannot be null or an empty string. + + + The '{0}' character, hexadecimal value {1}, cannot be included in a name. + + + Name cannot begin with the '{0}' character, hexadecimal value {1}. + + + The empty string '' is not a valid name. + + + Line {0}, position {1}. + + + '{0}' is not a valid Base64 text sequence. + + + '{0}' is not a valid BinHex text sequence. + + + '{0}' is not a valid BinHex text sequence. The sequence must contain an even number of characters. + + + '{0}', hexadecimal value {1}, is an invalid character. + + + '{0}' is an invalid XmlNodeType. + + + Operation is not valid due to the current state of the object. + + + '{0}' is an invalid name for processing instructions. + + + The {0} method is not supported on node type {1}. If you want to read typed content of an element, use the ReadElementContentAs method. + + + The {0} method is not supported on node type {1}. + + + Invalid high surrogate character (0x{0}). A high surrogate character must have a value from range (0xD800 - 0xDBFF). + + + The surrogate pair is invalid. Missing a low surrogate character. + + + The surrogate pair (0x{0}, 0x{1}) is invalid. A high surrogate character (0xD800 - 0xDBFF) must always be paired with a low surrogate character (0xDC00 - 0xDFFF). + + + {0} Line {1}, position {2}. + + + ReadContentAsBase64 and ReadContentAsBinHex method calls cannot be mixed with calls to ReadElementContentAsBase64 and ReadElementContentAsBinHex. + + + Prefix '{0}' cannot be mapped to namespace name reserved for "xml" or "xmlns". + + + Cannot use a prefix with an empty namespace. + + + Unknown resource string: {0}. + + + Prefix "xmlns" is reserved for use by XML. + + + Prefix "xml" is reserved for use by XML and can be mapped only to namespace name "http://www.w3.org/XML/1998/namespace". + + + A node of type '{0}' cannot have the name '{1}'. + + + The string '{0}' is not a valid {1} value. + + + Value '{0}' was either too large or too small for {1}. + + + Cannot String to '{1}'. + + + Xml type 'List of {0}' does not support Clr type '{1}'. + + + Xml type 'List of {0}' does not support a conversion from Clr type '{1}' to Clr type '{2}'. + + + The String '{0}' cannot be represented as an XmlQualifiedName. A namespace for prefix '{1}' cannot be found. + + + The QName '{0}' cannot be represented as a String. A prefix for namespace '{1}' cannot be found. + + + Cannot convert type '{0}' to String. + + + A node of type '{0}' cannot have a name. + + + Namespace prefix '{0}' is not defined. + + + This is an invalid object. Only objects returned from Compile() can be passed as input. + + + The 'current()' function cannot be used in a pattern. + + + '{0}' is an invalid expression. + + + Function '{0}()' has failed. + + + The argument to function '{0}' in '{1}' cannot be converted to a node-set. + + + '{0}' is an invalid key pattern. It either contains a variable reference or 'key()' function. + + + '{0}' has an invalid qualified name. + + + Function '{0}' in '{1}' has an invalid number of arguments. + + + '{0}' is an invalid XSLT pattern. + + + '{0}' has an invalid token. + + + Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function. + + + Expression must evaluate to a node-set. + + + The XPath query '{0}' is not supported. + + + The xpath query is too complex. + + + This is an unclosed string. + + + The function '{0}()' is undefined. + + + XsltContext is needed for this query because of an unknown function. + + + The variable '{0}' is undefined. + + + Operation is not valid due to the current position of the navigator. + + \ No newline at end of file diff --git a/src/System.Xml.XPath/System.Xml.XPath.csproj b/src/System.Xml.XPath/System.Xml.XPath.csproj index 47684c2d64f0..4a006edcbd60 100644 --- a/src/System.Xml.XPath/System.Xml.XPath.csproj +++ b/src/System.Xml.XPath/System.Xml.XPath.csproj @@ -1,4 +1,4 @@ - + @@ -40,16 +40,15 @@ AnyCPU MinimumRecommendedRules.ruleset - - $(MSBuildThisFileDirectory)Res - + + @@ -77,6 +76,11 @@ + + True + True + Strings.resx + @@ -169,5 +173,12 @@ + + + ResXFileCodeGenerator + Strings.Designer.cs + Designer + + \ No newline at end of file diff --git a/src/System.Xml.XmlDocument/src/Res/resources.resjson b/src/System.Xml.XmlDocument/src/Res/resources.resjson deleted file mode 100644 index 8f02b78c28c1..000000000000 --- a/src/System.Xml.XmlDocument/src/Res/resources.resjson +++ /dev/null @@ -1,86 +0,0 @@ -{ - "Xdom_Node_Null_Doc" : "Cannot create a node without an owner document.", - "Xdom_Node_Insert_Child" : "Cannot insert a node or any ancestor of that node as a child of itself.", - "Xdom_Node_Insert_Contain" : "The current node cannot contain other nodes.", - "Xdom_Node_Insert_Path" : "The reference node is not a child of this node.", - "Xdom_Node_Insert_Context" : "The node to be inserted is from a different document context.", - "Xdom_Node_Insert_Location" : "Cannot insert the node in the specified location.", - "Xdom_Node_Insert_TypeConflict" : "The specified node cannot be inserted as the valid child of this node, because the specified node is the wrong type.", - "Xdom_Node_Remove_Contain" : "The current node cannot contain other nodes, so the node to be removed is not its child.", - "Xdom_Node_Remove_Child" : "The node to be removed is not a child of this node.", - "Xdom_Node_Modify_ReadOnly" : "This node is read-only. It cannot be modified.", - "Xdom_TextNode_SplitText" : "The 'Text' node is not connected in the DOM live tree. No 'SplitText' operation could be performed.", - "Xdom_Attr_Reserved_XmlNS" : "The namespace declaration attribute has an incorrect 'namespaceURI': '{0}'.", - "Xdom_Node_Cloning" : "'Entity' and 'Notation' nodes cannot be cloned.", - "Xdom_DualDocumentTypeNode" : "This document already has a 'DocumentType' node.", - "Xdom_DualDocumentElementNode" : "This document already has a 'DocumentElement' node.", - "Xdom_DualDeclarationNode" : "This document already has an 'XmlDeclaration' node.", - "Xdom_Import" : "Cannot import nodes of type '{0}'.", - "Xdom_Import_NullNode" : "Cannot import a null node.", - "Xdom_NoRootEle" : "The document does not have a root element.", - "Xdom_Attr_Name" : "The attribute local name cannot be empty.", - "Xdom_AttrCol_Object" : "An 'Attributes' collection can only contain 'Attribute' objects.", - "Xdom_AttrCol_Insert" : "The reference node must be a child of the current node.", - "Xdom_NamedNode_Context" : "The named node is from a different document context.", - "Xdom_Version" : "Wrong XML version information. The XML must match production \"VersionNum ::= '1.' [0-9]+\".", - "Xdom_standalone" : "Wrong value for the XML declaration standalone attribute of '{0}'.", - "Xdom_Ele_Prefix" : "The prefix of an element name cannot start with 'xml'.", - "Xdom_Ent_Innertext" : "The 'InnerText' of an 'Entity' node is read-only and cannot be set.", - "Xdom_EntRef_SetVal" : "'EntityReference' nodes have no support for setting value.", - "Xdom_WS_Char" : "The string for white space contains an invalid character.", - "Xdom_Node_SetVal" : "Cannot set a value on node type '{0}'.", - "Xdom_Empty_LocalName" : "The local name for elements or attributes cannot be null or an empty string.", - "Xdom_Set_InnerXml" : "Cannot set the 'InnerXml' for the current node because it is either read-only or cannot have children.", - "Xdom_Attr_InUse" : "The 'Attribute' node cannot be inserted because it is already an attribute of another element.", - "Xdom_Enum_ElementList" : "The element list has changed. The enumeration operation failed to continue.", - "Xdom_Invalid_NT_String" : "'{0}' does not represent any 'XmlNodeType'.", - "Xdom_InvalidCharacter_EntityReference" : "Cannot create an 'EntityReference' node with a name starting with '#'.", - "Xdom_IndexOutOfRange" : "The index being passed in is out of range.", - "Xdom_Document_Innertext" : "The 'InnerText' of a 'Document' node is read-only and cannot be set.", - "Arg_ExpectingXmlTextReader" : "The XmlReader passed in to construct this XmlValidatingReaderImpl must be an instance of a System.Xml.XmlTextReader.", - "Arg_CannotCreateNode" : "Cannot create node of type {0}.", - "Arg_IncompatibleParamType" : "Type is incompatible.", - "XmlNonCLSCompliantException" : "Non-CLS Compliant Exception.", - "Xml_UnsupportedClass" : "Object type is not supported.", - "Xml_NullResolver" : "Resolving of external URIs was prohibited.", - "Xml_RelativeUriNotSupported" : "Relative URIs are not supported.", - "Xml_UnexpectedNodeType" : "Unexpected XmlNodeType: '{0}'.", - "Xml_InvalidOperation" : "Operation is not valid due to the current state of the object.", - "Xdom_Load_NoDocument" : "The document to be loaded could not be found.", - "Xdom_Load_NoReader" : "There is no reader from which to load the document.", - "Xml_UndeclaredParEntity" : "Reference to undeclared parameter entity '{0}'.", - "Xml_EmptyName" : "The empty string '' is not a valid name.", - "Xml_BadStartNameChar" : "Name cannot begin with the '{0}' character, hexadecimal value {1}.", - "Xml_BadNameChar" : "The '{0}' character, hexadecimal value {1}, cannot be included in a name.", - "Xml_UntrustedCodeSettingResolver" : "XmlResolver can be set only by fully trusted code.", - "Xml_InvalidSurrogateHighChar" : "Invalid high surrogate character (0x{0}). A high surrogate character must have a value from range (0xD800 - 0xDBFF).", - "Xml_InvalidSurrogateMissingLowChar" : "The surrogate pair is invalid. Missing a low surrogate character.", - "Xml_InvalidSurrogatePairWithArgs" : "The surrogate pair (0x{0}, 0x{1}) is invalid. A high surrogate character (0xD800 - 0xDBFF) must always be paired with a low surrogate character (0xDC00 - 0xDFFF).", - "Xml_NotInWriteState" : "NotInWriteState.", - "Xml_InvalidIndentation" : "Indentation value must be greater than 0.", - "Xml_InvalidQuote" : "Invalid XML attribute quote character. Valid attribute quote characters are ' and \".", - "Xml_NoRoot" : "Document does not have a root element.", - "Xml_UndefPrefix" : "An undefined prefix is in use.", - "Xml_NoNamespaces" : "Cannot set the namespace if Namespaces is 'false'.", - "Xml_XmlnsBelongsToReservedNs" : "The 'xmlns' attribute is bound to the reserved namespace 'http://www.w3.org/2000/xmlns/'.", - "Xml_SurrogatePairSplit" : "The second character surrogate pair is not in the input buffer to be written.", - "Xml_ClosedOrError" : "The Writer is closed or in error state.", - "Xml_InvalidCDataChars" : "Cannot have ']]>' inside an XML CDATA block.", - "Xml_InvalidCommentChars" : "An XML comment cannot contain '--', and '-' cannot be the last character.", - "Xml_InvalidPiChars" : "Cannot have '?>' inside an XML processing instruction.", - "Xml_DupXmlDecl" : "Cannot write XML declaration. WriteStartDocument method has already written it.", - "Xml_NonWhitespace" : "Only white space characters should be used.", - "Xml_UndefNamespace" : "The '{0}' namespace is not defined.", - "Xml_InvalidNameCharsDetail" : "Invalid name character in '{0}'. The '{1}' character, hexadecimal value {2}, cannot be included in a name.", - "Xml_NotTheFirst" : "WriteStartDocument needs to be the first call.", - "Xml_Closed" : "The Writer is closed.", - "Xml_WrongToken" : "Token {0} in state {1} would result in an invalid XML document.", - "Xml_NoStartTag" : "There was no XML start tag open.", - "Xml_CanNotBindToReservedNamespace" : "Cannot bind to the reserved namespace.", - "Xml_InvalidNameChars" : "Invalid name character in '{0}'.", - "Xml_PrefixForEmptyNs" : "Cannot use a prefix with an empty namespace.", - "Xml_InvalidXmlSpace" : "'{0}' is an invalid xml:space value.", - "Xml_InvalidPrefix" : "Prefixes beginning with \"xml\" (regardless of whether the characters are uppercase, lowercase, or some combination thereof) are reserved for use by XML.", - "XmlConvert_BadFormat" : "The string '{0}' is not a valid {1} value.", - "Xml_InvalidCharacter" : "'{0}', hexadecimal value {1}, is an invalid character." -} diff --git a/src/System.Xml.XmlDocument/src/Resources/Strings.Designer.cs b/src/System.Xml.XmlDocument/src/Resources/Strings.Designer.cs new file mode 100644 index 000000000000..1133fcebe561 --- /dev/null +++ b/src/System.Xml.XmlDocument/src/Resources/Strings.Designer.cs @@ -0,0 +1,820 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.35317 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Resources { + using System; + using System.Reflection; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Strings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Strings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("System.Xml.XmlDocument.Resources.Strings", typeof(Strings).GetTypeInfo().Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Cannot create node of type {0}.. + /// + internal static string Arg_CannotCreateNode { + get { + return ResourceManager.GetString("Arg_CannotCreateNode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The XmlReader passed in to construct this XmlValidatingReaderImpl must be an instance of a System.Xml.XmlTextReader.. + /// + internal static string Arg_ExpectingXmlTextReader { + get { + return ResourceManager.GetString("Arg_ExpectingXmlTextReader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type is incompatible.. + /// + internal static string Arg_IncompatibleParamType { + get { + return ResourceManager.GetString("Arg_IncompatibleParamType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The 'Attribute' node cannot be inserted because it is already an attribute of another element.. + /// + internal static string Xdom_Attr_InUse { + get { + return ResourceManager.GetString("Xdom_Attr_InUse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The attribute local name cannot be empty.. + /// + internal static string Xdom_Attr_Name { + get { + return ResourceManager.GetString("Xdom_Attr_Name", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The namespace declaration attribute has an incorrect 'namespaceURI': '{0}'.. + /// + internal static string Xdom_Attr_Reserved_XmlNS { + get { + return ResourceManager.GetString("Xdom_Attr_Reserved_XmlNS", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The reference node must be a child of the current node.. + /// + internal static string Xdom_AttrCol_Insert { + get { + return ResourceManager.GetString("Xdom_AttrCol_Insert", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An 'Attributes' collection can only contain 'Attribute' objects.. + /// + internal static string Xdom_AttrCol_Object { + get { + return ResourceManager.GetString("Xdom_AttrCol_Object", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The 'InnerText' of a 'Document' node is read-only and cannot be set.. + /// + internal static string Xdom_Document_Innertext { + get { + return ResourceManager.GetString("Xdom_Document_Innertext", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This document already has an 'XmlDeclaration' node.. + /// + internal static string Xdom_DualDeclarationNode { + get { + return ResourceManager.GetString("Xdom_DualDeclarationNode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This document already has a 'DocumentElement' node.. + /// + internal static string Xdom_DualDocumentElementNode { + get { + return ResourceManager.GetString("Xdom_DualDocumentElementNode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This document already has a 'DocumentType' node.. + /// + internal static string Xdom_DualDocumentTypeNode { + get { + return ResourceManager.GetString("Xdom_DualDocumentTypeNode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The prefix of an element name cannot start with 'xml'.. + /// + internal static string Xdom_Ele_Prefix { + get { + return ResourceManager.GetString("Xdom_Ele_Prefix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The local name for elements or attributes cannot be null or an empty string.. + /// + internal static string Xdom_Empty_LocalName { + get { + return ResourceManager.GetString("Xdom_Empty_LocalName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The 'InnerText' of an 'Entity' node is read-only and cannot be set.. + /// + internal static string Xdom_Ent_Innertext { + get { + return ResourceManager.GetString("Xdom_Ent_Innertext", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 'EntityReference' nodes have no support for setting value.. + /// + internal static string Xdom_EntRef_SetVal { + get { + return ResourceManager.GetString("Xdom_EntRef_SetVal", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The element list has changed. The enumeration operation failed to continue.. + /// + internal static string Xdom_Enum_ElementList { + get { + return ResourceManager.GetString("Xdom_Enum_ElementList", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot import nodes of type '{0}'.. + /// + internal static string Xdom_Import { + get { + return ResourceManager.GetString("Xdom_Import", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot import a null node.. + /// + internal static string Xdom_Import_NullNode { + get { + return ResourceManager.GetString("Xdom_Import_NullNode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The index being passed in is out of range.. + /// + internal static string Xdom_IndexOutOfRange { + get { + return ResourceManager.GetString("Xdom_IndexOutOfRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' does not represent any 'XmlNodeType'.. + /// + internal static string Xdom_Invalid_NT_String { + get { + return ResourceManager.GetString("Xdom_Invalid_NT_String", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot create an 'EntityReference' node with a name starting with '#'.. + /// + internal static string Xdom_InvalidCharacter_EntityReference { + get { + return ResourceManager.GetString("Xdom_InvalidCharacter_EntityReference", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The document to be loaded could not be found.. + /// + internal static string Xdom_Load_NoDocument { + get { + return ResourceManager.GetString("Xdom_Load_NoDocument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no reader from which to load the document.. + /// + internal static string Xdom_Load_NoReader { + get { + return ResourceManager.GetString("Xdom_Load_NoReader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The named node is from a different document context.. + /// + internal static string Xdom_NamedNode_Context { + get { + return ResourceManager.GetString("Xdom_NamedNode_Context", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 'Entity' and 'Notation' nodes cannot be cloned.. + /// + internal static string Xdom_Node_Cloning { + get { + return ResourceManager.GetString("Xdom_Node_Cloning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot insert a node or any ancestor of that node as a child of itself.. + /// + internal static string Xdom_Node_Insert_Child { + get { + return ResourceManager.GetString("Xdom_Node_Insert_Child", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The current node cannot contain other nodes.. + /// + internal static string Xdom_Node_Insert_Contain { + get { + return ResourceManager.GetString("Xdom_Node_Insert_Contain", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The node to be inserted is from a different document context.. + /// + internal static string Xdom_Node_Insert_Context { + get { + return ResourceManager.GetString("Xdom_Node_Insert_Context", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot insert the node in the specified location.. + /// + internal static string Xdom_Node_Insert_Location { + get { + return ResourceManager.GetString("Xdom_Node_Insert_Location", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The reference node is not a child of this node.. + /// + internal static string Xdom_Node_Insert_Path { + get { + return ResourceManager.GetString("Xdom_Node_Insert_Path", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified node cannot be inserted as the valid child of this node, because the specified node is the wrong type.. + /// + internal static string Xdom_Node_Insert_TypeConflict { + get { + return ResourceManager.GetString("Xdom_Node_Insert_TypeConflict", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This node is read-only. It cannot be modified.. + /// + internal static string Xdom_Node_Modify_ReadOnly { + get { + return ResourceManager.GetString("Xdom_Node_Modify_ReadOnly", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot create a node without an owner document.. + /// + internal static string Xdom_Node_Null_Doc { + get { + return ResourceManager.GetString("Xdom_Node_Null_Doc", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The node to be removed is not a child of this node.. + /// + internal static string Xdom_Node_Remove_Child { + get { + return ResourceManager.GetString("Xdom_Node_Remove_Child", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The current node cannot contain other nodes, so the node to be removed is not its child.. + /// + internal static string Xdom_Node_Remove_Contain { + get { + return ResourceManager.GetString("Xdom_Node_Remove_Contain", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot set a value on node type '{0}'.. + /// + internal static string Xdom_Node_SetVal { + get { + return ResourceManager.GetString("Xdom_Node_SetVal", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The document does not have a root element.. + /// + internal static string Xdom_NoRootEle { + get { + return ResourceManager.GetString("Xdom_NoRootEle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot set the 'InnerXml' for the current node because it is either read-only or cannot have children.. + /// + internal static string Xdom_Set_InnerXml { + get { + return ResourceManager.GetString("Xdom_Set_InnerXml", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Wrong value for the XML declaration standalone attribute of '{0}'.. + /// + internal static string Xdom_standalone { + get { + return ResourceManager.GetString("Xdom_standalone", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The 'Text' node is not connected in the DOM live tree. No 'SplitText' operation could be performed.. + /// + internal static string Xdom_TextNode_SplitText { + get { + return ResourceManager.GetString("Xdom_TextNode_SplitText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Wrong XML version information. The XML must match production "VersionNum ::= '1.' [0-9]+".. + /// + internal static string Xdom_Version { + get { + return ResourceManager.GetString("Xdom_Version", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The string for white space contains an invalid character.. + /// + internal static string Xdom_WS_Char { + get { + return ResourceManager.GetString("Xdom_WS_Char", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' character, hexadecimal value {1}, cannot be included in a name.. + /// + internal static string Xml_BadNameChar { + get { + return ResourceManager.GetString("Xml_BadNameChar", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Name cannot begin with the '{0}' character, hexadecimal value {1}.. + /// + internal static string Xml_BadStartNameChar { + get { + return ResourceManager.GetString("Xml_BadStartNameChar", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot bind to the reserved namespace.. + /// + internal static string Xml_CanNotBindToReservedNamespace { + get { + return ResourceManager.GetString("Xml_CanNotBindToReservedNamespace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Writer is closed.. + /// + internal static string Xml_Closed { + get { + return ResourceManager.GetString("Xml_Closed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Writer is closed or in error state.. + /// + internal static string Xml_ClosedOrError { + get { + return ResourceManager.GetString("Xml_ClosedOrError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot write XML declaration. WriteStartDocument method has already written it.. + /// + internal static string Xml_DupXmlDecl { + get { + return ResourceManager.GetString("Xml_DupXmlDecl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The empty string '' is not a valid name.. + /// + internal static string Xml_EmptyName { + get { + return ResourceManager.GetString("Xml_EmptyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot have ']]>' inside an XML CDATA block.. + /// + internal static string Xml_InvalidCDataChars { + get { + return ResourceManager.GetString("Xml_InvalidCDataChars", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}', hexadecimal value {1}, is an invalid character.. + /// + internal static string Xml_InvalidCharacter { + get { + return ResourceManager.GetString("Xml_InvalidCharacter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An XML comment cannot contain '--', and '-' cannot be the last character.. + /// + internal static string Xml_InvalidCommentChars { + get { + return ResourceManager.GetString("Xml_InvalidCommentChars", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Indentation value must be greater than 0.. + /// + internal static string Xml_InvalidIndentation { + get { + return ResourceManager.GetString("Xml_InvalidIndentation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid name character in '{0}'.. + /// + internal static string Xml_InvalidNameChars { + get { + return ResourceManager.GetString("Xml_InvalidNameChars", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid name character in '{0}'. The '{1}' character, hexadecimal value {2}, cannot be included in a name.. + /// + internal static string Xml_InvalidNameCharsDetail { + get { + return ResourceManager.GetString("Xml_InvalidNameCharsDetail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation is not valid due to the current state of the object.. + /// + internal static string Xml_InvalidOperation { + get { + return ResourceManager.GetString("Xml_InvalidOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot have '?>' inside an XML processing instruction.. + /// + internal static string Xml_InvalidPiChars { + get { + return ResourceManager.GetString("Xml_InvalidPiChars", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Prefixes beginning with "xml" (regardless of whether the characters are uppercase, lowercase, or some combination thereof) are reserved for use by XML.. + /// + internal static string Xml_InvalidPrefix { + get { + return ResourceManager.GetString("Xml_InvalidPrefix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid XML attribute quote character. Valid attribute quote characters are ' and ".. + /// + internal static string Xml_InvalidQuote { + get { + return ResourceManager.GetString("Xml_InvalidQuote", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid high surrogate character (0x{0}). A high surrogate character must have a value from range (0xD800 - 0xDBFF).. + /// + internal static string Xml_InvalidSurrogateHighChar { + get { + return ResourceManager.GetString("Xml_InvalidSurrogateHighChar", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The surrogate pair is invalid. Missing a low surrogate character.. + /// + internal static string Xml_InvalidSurrogateMissingLowChar { + get { + return ResourceManager.GetString("Xml_InvalidSurrogateMissingLowChar", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The surrogate pair (0x{0}, 0x{1}) is invalid. A high surrogate character (0xD800 - 0xDBFF) must always be paired with a low surrogate character (0xDC00 - 0xDFFF).. + /// + internal static string Xml_InvalidSurrogatePairWithArgs { + get { + return ResourceManager.GetString("Xml_InvalidSurrogatePairWithArgs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is an invalid xml:space value.. + /// + internal static string Xml_InvalidXmlSpace { + get { + return ResourceManager.GetString("Xml_InvalidXmlSpace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot set the namespace if Namespaces is 'false'.. + /// + internal static string Xml_NoNamespaces { + get { + return ResourceManager.GetString("Xml_NoNamespaces", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Only white space characters should be used.. + /// + internal static string Xml_NonWhitespace { + get { + return ResourceManager.GetString("Xml_NonWhitespace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Document does not have a root element.. + /// + internal static string Xml_NoRoot { + get { + return ResourceManager.GetString("Xml_NoRoot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was no XML start tag open.. + /// + internal static string Xml_NoStartTag { + get { + return ResourceManager.GetString("Xml_NoStartTag", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to NotInWriteState.. + /// + internal static string Xml_NotInWriteState { + get { + return ResourceManager.GetString("Xml_NotInWriteState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WriteStartDocument needs to be the first call.. + /// + internal static string Xml_NotTheFirst { + get { + return ResourceManager.GetString("Xml_NotTheFirst", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resolving of external URIs was prohibited.. + /// + internal static string Xml_NullResolver { + get { + return ResourceManager.GetString("Xml_NullResolver", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot use a prefix with an empty namespace.. + /// + internal static string Xml_PrefixForEmptyNs { + get { + return ResourceManager.GetString("Xml_PrefixForEmptyNs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Relative URIs are not supported.. + /// + internal static string Xml_RelativeUriNotSupported { + get { + return ResourceManager.GetString("Xml_RelativeUriNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The second character surrogate pair is not in the input buffer to be written.. + /// + internal static string Xml_SurrogatePairSplit { + get { + return ResourceManager.GetString("Xml_SurrogatePairSplit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reference to undeclared parameter entity '{0}'.. + /// + internal static string Xml_UndeclaredParEntity { + get { + return ResourceManager.GetString("Xml_UndeclaredParEntity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The '{0}' namespace is not defined.. + /// + internal static string Xml_UndefNamespace { + get { + return ResourceManager.GetString("Xml_UndefNamespace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An undefined prefix is in use.. + /// + internal static string Xml_UndefPrefix { + get { + return ResourceManager.GetString("Xml_UndefPrefix", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unexpected XmlNodeType: '{0}'.. + /// + internal static string Xml_UnexpectedNodeType { + get { + return ResourceManager.GetString("Xml_UnexpectedNodeType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Object type is not supported.. + /// + internal static string Xml_UnsupportedClass { + get { + return ResourceManager.GetString("Xml_UnsupportedClass", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to XmlResolver can be set only by fully trusted code.. + /// + internal static string Xml_UntrustedCodeSettingResolver { + get { + return ResourceManager.GetString("Xml_UntrustedCodeSettingResolver", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Token {0} in state {1} would result in an invalid XML document.. + /// + internal static string Xml_WrongToken { + get { + return ResourceManager.GetString("Xml_WrongToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The 'xmlns' attribute is bound to the reserved namespace 'http://www.w3.org/2000/xmlns/'.. + /// + internal static string Xml_XmlnsBelongsToReservedNs { + get { + return ResourceManager.GetString("Xml_XmlnsBelongsToReservedNs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The string '{0}' is not a valid {1} value.. + /// + internal static string XmlConvert_BadFormat { + get { + return ResourceManager.GetString("XmlConvert_BadFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Non-CLS Compliant Exception.. + /// + internal static string XmlNonCLSCompliantException { + get { + return ResourceManager.GetString("XmlNonCLSCompliantException", resourceCulture); + } + } + } +} diff --git a/src/System.Xml.XmlDocument/src/Resources/Strings.resx b/src/System.Xml.XmlDocument/src/Resources/Strings.resx new file mode 100644 index 000000000000..bfe0cf646076 --- /dev/null +++ b/src/System.Xml.XmlDocument/src/Resources/Strings.resx @@ -0,0 +1,372 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Cannot create node of type {0}. + + + The XmlReader passed in to construct this XmlValidatingReaderImpl must be an instance of a System.Xml.XmlTextReader. + + + Type is incompatible. + + + The 'Attribute' node cannot be inserted because it is already an attribute of another element. + + + The attribute local name cannot be empty. + + + The namespace declaration attribute has an incorrect 'namespaceURI': '{0}'. + + + The reference node must be a child of the current node. + + + An 'Attributes' collection can only contain 'Attribute' objects. + + + The 'InnerText' of a 'Document' node is read-only and cannot be set. + + + This document already has an 'XmlDeclaration' node. + + + This document already has a 'DocumentElement' node. + + + This document already has a 'DocumentType' node. + + + The prefix of an element name cannot start with 'xml'. + + + The local name for elements or attributes cannot be null or an empty string. + + + The 'InnerText' of an 'Entity' node is read-only and cannot be set. + + + 'EntityReference' nodes have no support for setting value. + + + The element list has changed. The enumeration operation failed to continue. + + + Cannot import nodes of type '{0}'. + + + Cannot import a null node. + + + The index being passed in is out of range. + + + '{0}' does not represent any 'XmlNodeType'. + + + Cannot create an 'EntityReference' node with a name starting with '#'. + + + The document to be loaded could not be found. + + + There is no reader from which to load the document. + + + The named node is from a different document context. + + + 'Entity' and 'Notation' nodes cannot be cloned. + + + Cannot insert a node or any ancestor of that node as a child of itself. + + + The current node cannot contain other nodes. + + + The node to be inserted is from a different document context. + + + Cannot insert the node in the specified location. + + + The reference node is not a child of this node. + + + The specified node cannot be inserted as the valid child of this node, because the specified node is the wrong type. + + + This node is read-only. It cannot be modified. + + + Cannot create a node without an owner document. + + + The node to be removed is not a child of this node. + + + The current node cannot contain other nodes, so the node to be removed is not its child. + + + Cannot set a value on node type '{0}'. + + + The document does not have a root element. + + + Cannot set the 'InnerXml' for the current node because it is either read-only or cannot have children. + + + Wrong value for the XML declaration standalone attribute of '{0}'. + + + The 'Text' node is not connected in the DOM live tree. No 'SplitText' operation could be performed. + + + Wrong XML version information. The XML must match production "VersionNum ::= '1.' [0-9]+". + + + The string for white space contains an invalid character. + + + The '{0}' character, hexadecimal value {1}, cannot be included in a name. + + + Name cannot begin with the '{0}' character, hexadecimal value {1}. + + + Cannot bind to the reserved namespace. + + + The Writer is closed. + + + The Writer is closed or in error state. + + + Cannot write XML declaration. WriteStartDocument method has already written it. + + + The empty string '' is not a valid name. + + + Cannot have ']]>' inside an XML CDATA block. + + + '{0}', hexadecimal value {1}, is an invalid character. + + + An XML comment cannot contain '--', and '-' cannot be the last character. + + + Indentation value must be greater than 0. + + + Invalid name character in '{0}'. + + + Invalid name character in '{0}'. The '{1}' character, hexadecimal value {2}, cannot be included in a name. + + + Operation is not valid due to the current state of the object. + + + Cannot have '?>' inside an XML processing instruction. + + + Prefixes beginning with "xml" (regardless of whether the characters are uppercase, lowercase, or some combination thereof) are reserved for use by XML. + + + Invalid XML attribute quote character. Valid attribute quote characters are ' and ". + + + Invalid high surrogate character (0x{0}). A high surrogate character must have a value from range (0xD800 - 0xDBFF). + + + The surrogate pair is invalid. Missing a low surrogate character. + + + The surrogate pair (0x{0}, 0x{1}) is invalid. A high surrogate character (0xD800 - 0xDBFF) must always be paired with a low surrogate character (0xDC00 - 0xDFFF). + + + '{0}' is an invalid xml:space value. + + + Cannot set the namespace if Namespaces is 'false'. + + + Only white space characters should be used. + + + Document does not have a root element. + + + There was no XML start tag open. + + + NotInWriteState. + + + WriteStartDocument needs to be the first call. + + + Resolving of external URIs was prohibited. + + + Cannot use a prefix with an empty namespace. + + + Relative URIs are not supported. + + + The second character surrogate pair is not in the input buffer to be written. + + + Reference to undeclared parameter entity '{0}'. + + + The '{0}' namespace is not defined. + + + An undefined prefix is in use. + + + Unexpected XmlNodeType: '{0}'. + + + Object type is not supported. + + + XmlResolver can be set only by fully trusted code. + + + Token {0} in state {1} would result in an invalid XML document. + + + The 'xmlns' attribute is bound to the reserved namespace 'http://www.w3.org/2000/xmlns/'. + + + The string '{0}' is not a valid {1} value. + + + Non-CLS Compliant Exception. + + \ No newline at end of file diff --git a/src/System.Xml.XmlDocument/src/System.Xml.XmlDocument.csproj b/src/System.Xml.XmlDocument/src/System.Xml.XmlDocument.csproj index 4b757a40112a..fe1c8ea97ffc 100644 --- a/src/System.Xml.XmlDocument/src/System.Xml.XmlDocument.csproj +++ b/src/System.Xml.XmlDocument/src/System.Xml.XmlDocument.csproj @@ -1,4 +1,4 @@ - + @@ -42,15 +42,14 @@ AnyCPU MinimumRecommendedRules.ruleset - - $(MSBuildThisFileDirectory)Res - + + @@ -74,6 +73,11 @@ + + True + True + Strings.resx + @@ -116,5 +120,13 @@ + + + ResXFileCodeGenerator + Strings.Designer.cs + Designer + Resources + + \ No newline at end of file