stevedlawrence commented on code in PR #945:
URL: https://github.com/apache/daffodil/pull/945#discussion_r1094679109
##########
daffodil-runtime1/src/main/scala/org/apache/daffodil/dpath/NodeInfo.scala:
##########
@@ -535,15 +535,16 @@ object NodeInfo extends Enum {
protected def fromString(s: String): DataValueNumber
def fromXMLString(s: String): DataValueNumber = {
Review Comment:
`fromXMLString` is also used to convert values from an infoset to their
primitives types (and maybe a couple other places as well). So this change
would allow whitespace in a infoset numeric value, for example `<foo> 123
</foo>` would be allowed.
I'm not sure what DFDL or XML says about that? Maybe that should be allowed
and this fixes more than just our DPath stuff and makes infoset parsing a
little more lax. I think XML schema does allow the whitespace when validating
numerics, so maybe this is a good change?
But if either says it shouldn't be allowed, maybe the trim should only be
called in the StringTo* functions in ConverterOps.scala, which is specific to
DPath?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]