mbeckerle commented on a change in pull request #460:
URL: https://github.com/apache/incubator-daffodil/pull/460#discussion_r532775672



##########
File path: 
daffodil-propgen/src/main/scala/org/apache/daffodil/propGen/TunableGenerator.scala
##########
@@ -134,7 +138,9 @@ class TunableGenerator(schemaRootConfig: scala.xml.Node, 
schemaRootExt: scala.xm
     val tunables =
       tunableNodes.map { tunableNode =>
         val schemaName = tunableNode \@ "name"
-        val schemaType = tunableNode \@ "type"
+        val schemaType =
+          if (tunableNode \@ "type" != "") tunableNode \@ "type"
+          else tunableNode \\ "restriction" \@ "base"

Review comment:
       This code is not going to give any sort of useful diagnostic if the XSD 
just happens to have constructs that aren't recognized in it. 
   
   Add a check here if there is no type attribute, then there must be a 
restriction, or throw a useful diagnostic stating that these are the only 
allowed options. 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to