mbeckerle commented on a change in pull request #207: Added support for 
enumerations and TypeValueCalc
URL: https://github.com/apache/incubator-daffodil/pull/207#discussion_r275128079
 
 

 ##########
 File path: 
daffodil-core/src/main/scala/org/apache/daffodil/dsom/ReptypeMixins.scala
 ##########
 @@ -0,0 +1,33 @@
+package org.apache.daffodil.dsom
+
+import scala.xml.UnprefixedAttribute
+import scala.xml.Null
+import scala.xml.Elem
+import org.apache.daffodil.processors.RepValueSet
+
+/*
+ * To make use of a reptype, it is common for the parser/unparser to need an 
element associated with said type
+ * Since such an element does not nessasarily exist in the schema itself, 
those elements which have a reptype also
+ * need to get a psuedo element with said type.
+ */
+trait hasOptRepTypeMixinImpl extends SchemaComponent with hasOptRepTypeMixin{
+  
+  override lazy val optRepTypeElement: Option[RepTypeQuasiElementDecl] = 
optRepTypeDefFactory.map(repType => {
+    val xmlElem = Elem(null, "PsuedoElementForTypeCalc", new 
UnprefixedAttribute("type", repType.namedQName.toAttributeNameString, Null), 
repType.namespaces, true)
 
 Review comment:
   Quasi, not pseudo. We need to be consistent.

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


With regards,
Apache Git Services

Reply via email to