stevedlawrence commented on a change in pull request #143: Support
dfdl:length="prefixed"
URL: https://github.com/apache/incubator-daffodil/pull/143#discussion_r239926438
##########
File path:
daffodil-propgen/src/main/scala/org/apache/daffodil/propGen/PropertyGenerator.scala
##########
@@ -493,9 +493,18 @@ object Currency {
}
def generateNonEnumInstantiation(propName: String, typeName: String) = {
- val midTemplate = """ def EUR = convertToTYPE(cacheProperty("EUR").value)
-"""
val converterName = getConverterTypeName(typeName)
+ val midTemplate = if (converterName != "QName") {
Review comment:
They are sortof related. The dfdl:prefixLengthType property is a QName.
Without this conversion, call element.prefixLengthProperty returned a String,
and then I had to do a QName converion to be able to find the simpelType. I
figured it better to do the conversion as part of the code generator so that
all QName conversions can happen in one place and we don't have to remember how
to convert Strings to QNames.
----------------------------------------------------------------
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