regetom commented on pull request #481:
URL: https://github.com/apache/daffodil/pull/481#issuecomment-800252311
Here is the modified class definition:class DelimiterCookerNoES(pn: String)
extends ListOfString1OrMoreLiteral(pn, true) {
override val oneLiteralCooker: StringLiteralBase =
new StringLiteralNoCharClassEntities(propName, true) with
DisallowedCharClassEntitiesMixin {
//override protected def noCharClassEntities(raw: String, context:
ThrowsSDE): Unit = {
// TODO: this isn't quite right, as it will allow combined delimiters
// that still match the empty string, e.g. "%ES;%WSP*;". We could check
// if raw.contains("%WSP*;"), but that is too general, preventing valid
// delimiters like "foo%WSP*;bar". Although the below matches the
// specification, it's probably not the intended behavior.
override val disallowedCharClassEntities = Seq("ES")
override def testRaw(raw: String, context: ThrowsSDE) = {
context.schemaDefinitionUnless(raw != "%WSP*;", """The WSP* entity
cannot appear on it's own when dfdl:lengthKind="delimited".""")
super[DisallowedCharClassEntitiesMixin].testRaw(raw, context)
}
//context.schemaDefinitionUnless(raw != "%WSP*;", "Property dfdl:%s
cannot contain %%WSP*; when dfdl:lengthKind=\"delimited\".", propName)
//context.schemaDefinitionUnless(raw != "%ES;", "Property dfdl:%s
cannot contain %%ES; when dfdl:lengthKind=\"delimited\".", propName)
//}
}
}
I tried to check in my changes but I need to check them into the new
non-incubator branch and I didn't want to loose the previous comments.
----------------------------------------------------------------
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]