Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove erroneous curlies in Xml resource #33890

Merged
merged 33 commits into from
Apr 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f590357
Added test for Issue 30218, use of resource Sch_MinLengthGtBaseMinLength
mrj001 Mar 20, 2020
048e2ce
Reworded error message to remove the invalid formatters.
mrj001 Mar 20, 2020
0c1c84c
Updated check of message from the exception to be more amenable to po…
mrj001 Mar 30, 2020
ee5bccd
Reworded resource Sch_MaxLengthGtBaseMaxLength and added unit test fo…
mrj001 Mar 30, 2020
9730c1a
Simplified test code per feedback from Dan Moseley, PR#33890.
mrj001 Mar 31, 2020
f883e85
Tests to increase code coverage. The ones that are failing trigger …
mrj001 Mar 31, 2020
c008edb
Removed invalid formatters from the resource string Sch_MaxMinLengthB…
mrj001 Mar 31, 2020
ab3244f
Added test for the Exception using string resource Sch_LengthGtBaseLe…
mrj001 Apr 1, 2020
0166ce3
Reworded string resource Sch_LengthGtBaseLength to remove the invalid…
mrj001 Apr 1, 2020
6fe8ecc
Added unit tests for uses of string resource Sch_FacetBaseFixed.
mrj001 Apr 2, 2020
1fe921b
Made test for the message containing "fixed" more specific.
mrj001 Apr 2, 2020
74e4c6f
Reworded string resource Sch_FacetBaseFixed to remove the invalid for…
mrj001 Apr 2, 2020
dca3b45
Added unit test to cover usage of string resource Sch_InvalidAllMax. …
mrj001 Apr 2, 2020
f848965
Reworded string resource Sch_InvalidAllMax to remove the invalid form…
mrj001 Apr 2, 2020
892c607
Added unit test for String Resource Sch_InvalidAllElementMax - invali…
mrj001 Apr 2, 2020
caa875c
Reworded string resource Sch_InvalidAllElementMax to remove the inval…
mrj001 Apr 2, 2020
1a1ae36
Added unit test which causes an XmlSchemaException using string resou…
mrj001 Apr 2, 2020
f8a2339
Reworded Sch_InvalidExemplar to remove the invalid formatter. Also, …
mrj001 Apr 2, 2020
1a00496
Added unit test that causes an XmlSchemaException to be thrown using …
mrj001 Apr 3, 2020
0ae6b04
Removed the curly braces so there are no longer any invalid formatters.
mrj001 Apr 3, 2020
962ecee
Added unit tests that cause an XmlSchemaException to be thrown using …
mrj001 Apr 3, 2020
0f74226
Changed string resource Sch_AllRefMinMax to remove the invalid format…
mrj001 Apr 3, 2020
6690162
reworded Sch_MinLengthGtBaseMinLength and Sch_MaxLengthGtBaseMaxLengt…
mrj001 Apr 7, 2020
6886472
Corrected error "greater than" to "less than".
mrj001 Apr 9, 2020
f925303
Changed name of test to more accurately reflect its purpose.
mrj001 Apr 9, 2020
1aef440
Changed casing of MinLength and MaxLength to match their XML facets. …
mrj001 Apr 9, 2020
129ff7a
Removed all Regex used to find invalid formatters.
mrj001 Apr 9, 2020
e560d7d
renamed MaxMinLengthBaseLength_TestData to indicate that this is test…
mrj001 Apr 9, 2020
c5fe335
Removed suppression of exception so that we will see the exception if…
mrj001 Apr 9, 2020
8a7d0d7
Removed comments as there are issues tracking these.
mrj001 Apr 9, 2020
ca16c1c
Fixed comment larger -> lower.
mrj001 Apr 13, 2020
36c94c3
Removed XML comments on test methods.
mrj001 Apr 13, 2020
45f9837
Removal of XML comment that was missed.
mrj001 Apr 14, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/libraries/System.Private.Xml/src/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@
<value>It is an error for both length and minLength or maxLength to be present.</value>
</data>
<data name="Sch_MinLengthGtMaxLength" xml:space="preserve">
<value>MinLength is greater than MaxLength.</value>
<value>minLength is greater than maxLength.</value>
</data>
<data name="Sch_FractionDigitsGtTotalDigits" xml:space="preserve">
<value>FractionDigits is greater than TotalDigits.</value>
Expand Down Expand Up @@ -1396,7 +1396,7 @@
<value>'all' must have 'minOccurs' value of 0 or 1.</value>
</data>
<data name="Sch_InvalidAllMax" xml:space="preserve">
<value>'all' must have {max occurs}=1.</value>
<value>'all' must have a 'maxOccurs' value of 1.</value>
</data>
<data name="Sch_InvalidFacet" xml:space="preserve">
<value>The 'value' attribute must be present in facet.</value>
Expand Down Expand Up @@ -1501,7 +1501,7 @@
<value>Duplicate ID attribute.</value>
</data>
<data name="Sch_InvalidAllElementMax" xml:space="preserve">
<value>The {max occurs} of all the particles in the {particles} of an all group must be 0 or 1.</value>
<value>The 'maxOccurs' attribute of all the particles of an 'all' group must be 0 or 1.</value>
</data>
<data name="Sch_InvalidAny" xml:space="preserve">
<value>Invalid namespace in 'any'.</value>
Expand All @@ -1510,7 +1510,7 @@
<value>The value of the namespace attribute of the element or attribute wildcard is invalid - {0}</value>
</data>
<data name="Sch_InvalidExamplar" xml:space="preserve">
<value>Cannot be nominated as the {substitution group affiliation} of any other declaration.</value>
<value>Element '{0}' cannot be nominated as the 'substitutionGroup' of any other declaration.</value>
</data>
<data name="Sch_NoExamplar" xml:space="preserve">
<value>Reference to undeclared substitution group affiliation.</value>
Expand Down Expand Up @@ -1636,7 +1636,7 @@
<value>The derived particle cannot have more members than the base particle - All:All,Sequence:Sequence -- Recurse Rule 2 / Choice:Choice -- RecurseLax.</value>
</data>
<data name="Sch_GroupBaseRestNotEmptiable" xml:space="preserve">
<value>All particles in the {particles} of the base particle which are not mapped to by any particle in the {particles} of the derived particle should be emptiable - All:All,Sequence:Sequence -- Recurse Rule 2 / Choice:Choice -- RecurseLax.</value>
<value>All particles in the particles of the base particle which are not mapped to by any particle in the particles of the derived particle should be emptiable - All:All,Sequence:Sequence -- Recurse Rule 2 / Choice:Choice -- RecurseLax.</value>
</data>
<data name="Sch_SeqFromAll" xml:space="preserve">
<value>The derived sequence particle at ({0}, {1}) is not a valid restriction of the base all particle at ({2}, {3}) according to Sequence:All -- RecurseUnordered.</value>
Expand All @@ -1654,7 +1654,7 @@
<value>The group ref to 'all' is not the root particle, or it is being used as an extension.</value>
</data>
<data name="Sch_AllRefMinMax" xml:space="preserve">
<value>The group ref to 'all' must have {min occurs}= 0 or 1 and {max occurs}=1.</value>
<value>The group ref to 'all' must have 'minOccurs' = 0 or 1 and 'maxOccurs' = 1.</value>
</data>
<data name="Sch_NotAllAlone" xml:space="preserve">
<value>'all' is not the only particle in a group, or is being used as an extension.</value>
Expand Down Expand Up @@ -1720,16 +1720,16 @@
<value>Cannot load the schema from the location '{0}' - {1}</value>
</data>
<data name="Sch_LengthGtBaseLength" xml:space="preserve">
<value>It is an error if 'length' is among the members of {facets} of {base type definition} and {value} is greater than the {value} of the parent 'length'.</value>
<value>It is an error if 'length' is among the members of the facets of the base type definition and its value is greater than the value of the parent 'length'.</value>
buyaa-n marked this conversation as resolved.
Show resolved Hide resolved
</data>
<data name="Sch_MinLengthGtBaseMinLength" xml:space="preserve">
<value>It is an error if 'minLength' is among the members of {facets} of {base type definition} and {value} is less than the {value} of the parent 'minLength'.</value>
<value>It is an error if 'minLength' is among the members of the facets of the base type definition and its value is less than the value of the parent 'minLength'.</value>
</data>
<data name="Sch_MaxLengthGtBaseMaxLength" xml:space="preserve">
<value>It is an error if 'maxLength' is among the members of {facets} of {base type definition} and {value} is greater than the {value} of the parent 'maxLength'.</value>
<value>It is an error if 'maxLength' is among the members of the facets of the base type definition and its value is greater than the value of the parent 'maxLength'.</value>
</data>
<data name="Sch_MaxMinLengthBaseLength" xml:space="preserve">
<value>It is an error for both 'length' and either 'minLength' or 'maxLength' to be members of {facets}, unless they are specified in different derivation steps. In which case the following must be true: the {value} of 'minLength' &lt;= the {value} of 'length' &lt;= the {value} of 'maxLength'.</value>
<value>It is an error for both 'length' and either 'minLength' or 'maxLength' to be members of facets, unless they are specified in different derivation steps. In which case the following must be true: the value of 'minLength' &lt;= the value of 'length' &lt;= the value of 'maxLength'.</value>
</data>
<data name="Sch_MaxInclusiveMismatch" xml:space="preserve">
<value>It is an error if the derived 'maxInclusive' facet value is greater than the parent 'maxInclusive' facet value.</value>
Expand Down Expand Up @@ -1768,7 +1768,7 @@
<value>It is an error if the derived 'fractionDigits' facet value is greater than the parent 'fractionDigits' facet value.</value>
</data>
<data name="Sch_FacetBaseFixed" xml:space="preserve">
<value>Values that are declared as {fixed} in a base type can not be changed in a derived type.</value>
<value>Values that are declared with fixed='true' in a base type can not be changed in a derived type.</value>
</data>
<data name="Sch_WhiteSpaceRestriction1" xml:space="preserve">
<value>It is an error if 'whiteSpace' is among the members of {facets} of {base type definition}, {value} is 'replace' or 'preserve', and the {value} of the parent 'whiteSpace' is 'collapse'.</value>
Expand Down Expand Up @@ -3456,4 +3456,4 @@ Usage: dotnet {0} [--assembly &lt;assembly file path&gt;] [--type &lt;type name&
<data name="CompilingScriptsNotSupported" xml:space="preserve">
<value>Compiling JScript/CSharp scripts is not supported</value>
</data>
</root>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ private void CompileSubstitutionGroup(XmlSchemaSubstitutionGroupV1Compat substit
{
if (examplar.FinalResolved == XmlSchemaDerivationMethod.All)
{
SendValidationEvent(SR.Sch_InvalidExamplar, examplar);
SendValidationEvent(SR.Sch_InvalidExamplar, examplar.Name, examplar);
}

for (int i = 0; i < substitutionGroup.Members.Count; ++i)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ private void CompileSubstitutionGroup(XmlSchemaSubstitutionGroup substitutionGro
{
if (examplar.FinalResolved == XmlSchemaDerivationMethod.All)
{
SendValidationEvent(SR.Sch_InvalidExamplar, examplar);
SendValidationEvent(SR.Sch_InvalidExamplar, examplar.Name, examplar);
}
//Build transitive members
ArrayList newMembers = null;
Expand Down
Loading