stevedlawrence commented on issue #159: Restrict coercion of a whole expression URL: https://github.com/apache/incubator-daffodil/pull/159#issuecomment-451223345 According to w3c XPath, integer literals are alwyas xs:integer and then coerecion happens as needed. But this change is to disable coerecion of expression result. So technical 2 isn't an xs:int. Note that Daffodil does do some stuff to coerece literals down to int's' or long's (though I think technically this isn't spec compliant?), so 2 is probably considered an xs:int. But for example, we never coerce literals to xs:short's, so if you had something like this, it would fail without coerecion: ```xml <xs:element name="a" type="xs:short" dfdl:inputValueCalc="{ 2 }" /> ``` The suggestion of allowing coerence between types only when no rounding/truncation should occur seems reasonable. I'll try it out.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
