mbeckerle commented on a change in pull request #61: Base64, gzip, and
line-folding layering
URL: https://github.com/apache/incubator-daffodil/pull/61#discussion_r185888414
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/dsom/SequenceGroup.scala
##########
@@ -245,6 +248,31 @@ abstract class SequenceTermBase(
maybeCheckBitOrderAndCharset)
}
+ private val layeredSequenceAllowedProps = Set("ref", "layerTransform",
"layerEncoding", "layerLengthKind", "layerLength", "layerLengthUnits",
"layerBoundaryMark")
+
+ final lazy val maybeLayerTransformerEv: Maybe[LayerTransformerEv] = {
+ if (maybeLayerTransformEv.isEmpty) Maybe.Nope
+ else { // need to check that only layering properties are specified
+ val localProps = this.formatAnnotation.justThisOneProperties
+ val localKeys = localProps.keySet
+ val disallowedKeys = localKeys.filterNot(k =>
layeredSequenceAllowedProps.contains(k))
+ if (disallowedKeys.size > 0)
+ SDE("Sequence has dfdl:layerTransform specified, so cannot have
non-layering properties: %s", disallowedKeys)
Review comment:
Also, yes, other namespace attributes will be ignored. Tests test_layer2 and
test_layersErr1 verify this.
----------------------------------------------------------------
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