mbeckerle commented on code in PR #1070: URL: https://github.com/apache/daffodil/pull/1070#discussion_r1303604024
########## daffodil-runtime1/src/main/scala/org/apache/daffodil/runtime1/processors/TypeCalculator.scala: ########## @@ -21,135 +21,98 @@ import scala.collection.immutable.HashMap import scala.collection.immutable.HashSet import org.apache.daffodil.lib.exceptions.Assert -import org.apache.daffodil.lib.util.Delay import org.apache.daffodil.lib.util.Maybe -import org.apache.daffodil.lib.util.Maybe.One import org.apache.daffodil.lib.util.Numbers -import org.apache.daffodil.lib.xml.QNameBase -import org.apache.daffodil.runtime1.dpath.DState import org.apache.daffodil.runtime1.dpath.NodeInfo -import org.apache.daffodil.runtime1.dsom.CompiledExpression import org.apache.daffodil.runtime1.infoset.DataValue import org.apache.daffodil.runtime1.infoset.DataValue.DataValuePrimitive import org.apache.daffodil.runtime1.infoset.DataValue.DataValuePrimitiveNullable import org.apache.daffodil.runtime1.processors.parsers.PState import org.apache.daffodil.runtime1.processors.parsers.ParseError import org.apache.daffodil.runtime1.processors.unparsers.UState +/** + * A TypeCalculator is a class that performs some kind of conversion from one DataValuePrimitive + * to another DataValuePrimitive. In general, this is done to convert a parsed physical + * representation from the data to a logical representation that goes in the infoset, and + * reverse on unparse. The former is done in the inputTypeCalc functions, and the latter in the + * outputTypeCalc functions. Generally the conversion is to a different type (e.g. xs:int to + * xs:string), but this need not be the case. Review Comment: I'd prefer to not support anything other than int->string. But we can make further changes later to restrict that. I do not think string transformation by lookup tables (which is what string-string really kind of is) would ever become part of the DFDL standard because it's too far down the slippery slope of transformation. -- 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]
