[
https://issues.apache.org/jira/browse/DAFFODIL-2596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17647728#comment-17647728
]
Mike Beckerle commented on DAFFODIL-2596:
-----------------------------------------
We ran into a related problem. Our data is binary with 1-bit alignment.
For our enums which have binary repTypes, but strings as the enumeration
values, not only did we need to put in dfdl:lengthKind='delimited' but
dfdl:alignment="8" in our format because Daffodil thinks somehow the string is
being used for representation and issues errors about the characters of a
US-ASCII string not being 8-bit aligned.
Basically, some of this checking in Daffodil pre-dates the introduction of
dfdlx:repType, so does not treat the string as just a computed element.
> lengthKind property is not inherited for types with dfdlx:repType
> -----------------------------------------------------------------
>
> Key: DAFFODIL-2596
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2596
> Project: Daffodil
> Issue Type: Bug
> Components: Front End
> Affects Versions: 3.2.0
> Reporter: Josh Adams
> Assignee: Josh Adams
> Priority: Major
>
> Ran into this while working on a customer schema
> Essentially if the default dfdl:lengthKind="implicit" and you attempt to use
> a dfdl:repType that involves uses string values for its enumeration, you will
> either get an error complaining that you cannot have an xs:string with
> lengthKind="implicit" without specifying a maxLength, OR for some unknown
> reason you can get a completely different usage error:
> org.apache.daffodil.exceptions.Abort: Usage error: v.>=(0)
> org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:137)
> org.apache.daffodil.util.MaybeULong$.apply(MaybeULong.scala:54)
> org.apache.daffodil.util.MaybeJULong$.apply(MaybeULong.scala:84)
> org.apache.daffodil.processors.LengthInBitsEvBase.compute(EvElement.scala:144)
> at org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:137)
> at org.apache.daffodil.util.MaybeULong$.apply(MaybeULong.scala:54)
> at org.apache.daffodil.util.MaybeJULong$.apply(MaybeULong.scala:84)
> at
> org.apache.daffodil.processors.LengthInBitsEvBase.compute(EvElement.scala:144)
> at
> org.apache.daffodil.processors.LengthInBitsEvBase.compute(EvElement.scala:118)
> at
> org.apache.daffodil.processors.Evaluatable.evaluate(Evaluatable.scala:281)
> at
> org.apache.daffodil.processors.Evaluatable.compileTimeEvaluate(Evaluatable.scala:212)
> at
> org.apache.daffodil.processors.Evaluatable.compile(Evaluatable.scala:317)
> at
> org.apache.daffodil.processors.Evaluatable.compile(Evaluatable.scala:326)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)