Section 6.13.28 NUMBERVALUE
Replace semantics with the following:
Converts given Text value X into Number. If X is a Reference, it is first dereferenced.
X is transformed according to the following rules:
1. Starting from the beginning, remove all occurrences of the group separator before any decimal separator
2. Starting from the beginning, replace the first occurrence in the text of the decimal separator character with the FULL STOP (U+002E) character
3. Remove all whitespace characters (See 5.14).
4. If the first character of the resulting string is a period FULL STOP (U+002E) then prepend a zero
5. If the string ends in one or more instances of PERCENT SIGN (U+0025) , remove the percent sign(s)
If the resulting string is a valid xsd:float, then return the number corresponding to that string, according to the definition provided in XML Schema, Part 2, Section 3.2.4. If percent signs were removed in step 5, divide the value of the returned number by 100 for each percent sign removed.
If the string is not a valid xsd:float then return an error.
[Note for Editor -- We should also add a normative reference for XML Schema, Part 2. We can just copy the reference used in Part 1]