You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The XML parser will default to value of 0.0 (see E57XmlParser::endElement), so in the cartesianY case it is out of range.
This is correct for any other "Float" node (E57 Standard 8.3.4.2):
The value of a Float is represented as child text of the XML element. This child text shall be zero or one occurrence of the xsd:float representation (if precision is single) or xsd:double (if precision is double), with optional leading and trailing XML whitespace. If no value is specified, the default value of the Float is 0.
However for prototypes (E57 Standard 8.3.9.3 (1)):
(1) The prototype child element specifies the structure of the data that will be stored in the CompressedVector, as well as the possible range of values that the data may take. The prototype shall be any E57 element type (with potential sub-children) except Blob and CompressedVector. The values of the prototype elements and sub-elements are ignored, and need not be specified.
So this case should not throw an exception.
The text was updated successfully, but these errors were encountered:
A prototype field like this would throw an exception because it was checking the default value (0.0) against the range:
<cartesianY type="Float" minimum="0.040010999888181686" maximum="0.1873210072517395" />
Instead, only perform the check if we have explicitly set the value.
This fix follows the standard (E57 Standard 8.3.9.3 (1)) which allows this form:
"The values of the prototype elements and sub-elements are ignored, and need not be specified."
Fixes#246
)
A prototype field like this would throw an exception because it was checking the default value (0.0) against the range:
<cartesianY type="Float" minimum="0.040010999888181686" maximum="0.1873210072517395" />
Instead, only perform the check if we have explicitly set the value.
This fix follows the standard (E57 Standard 8.3.9.3 (1)) which allows this form:
"The values of the prototype elements and sub-elements are ignored, and need not be specified."
Fixes#246
A prototype like the following will throw an exception:
The XML parser will default to
value
of0.0
(seeE57XmlParser::endElement
), so in thecartesianY
case it is out of range.This is correct for any other "Float" node (E57 Standard 8.3.4.2):
However for prototypes (E57 Standard 8.3.9.3 (1)):
So this case should not throw an exception.
The text was updated successfully, but these errors were encountered: