DAFFODIL-2638 asks for a new feature to be able to selectively suppress schema
definition warnings in specific locations by adding inline annotations to the
schema. This is useful since some schemas will always create warnings and we
don't necessarily want to carry around a config or tunables to suppress them.
Also, using config/tunables suppresses warnings globally, but ideally they would
only be suppressed in specific places to acknowledge the warning is is expected.
I started implementing this and the initial approach was to add a new extension
property (e.g. dfdlx:suppressSchemaDefinitionWarnings) that could be placed on
any schema component, and would be used to suppress any warnings where that
component is the context.
The issue with this is it makes use of normal property lookup logic, but some
contexts where warnings can be generated cannot lookup properties (e.g. global
complex element definition). In some cases the warnings might be so early in the
schema compilation process that resolution traits might not even be available.
So I started this to discuss if there are any ideas for how this feaure might wok.
Do we add the ability for these components (like global complex type definition)
to resolve properties?
Do we manually parse XML attributes and not use normal property resolution in
these cases? So we could use the property, but not inherit default properties or
refs, for example.
Is this just a limitation, and some warnings just can't be suppressed inline?
Do we need a lower level syntax that doesn't make use of properties at all,
maybe something like COVERAGE-OFF/ON comments that we use to disable code
coverage? Maybe something that can exist and be parsed even before DSOM is even
fully built?
Thoughts?