Some DFDL attributes can be used only if certain rules are met. Develop a method to enforce the rules in the editor.
Non-comprehensive listing of attribute rules:
DFDLAttributeRules.xlsx
Edited: 01-29-2026
The most comprehensive list of DFDL attribute rules is src/language/dfdl-xref/DFDL_Schema_Definition_Errors.MD
One method to implement some of the rules is to mimic the code for the "group" parent element case for the "appinfo" element in the function nearestOpenTagChildElements() in the source file src/language/providers/elementCompletion.ts.
Below is an screen capture of the code:
This case handles a rule where the "newVariableInstance" attribute is not allowed when the parent of "annotation"/"appinfo" is "group" with a "ref" attribute.
