In minutes of 2014-10-28 we took the position that 'x[1]' is allowed on scalars, and implementations can warn.
However,....
I just spotted this language in the latest DFDL spec, section 2.6
• Expression Errors
- Indexing of non-array non-optional element
Example: x[1] when x is declared and has both minOccurs="1" and maxOccurs="1" explicitly, or by not stating either or both of them.
Oops...
So it appears we already took a position on whether x[1] is allowed for scalars. It's not. It's a schema definition error.
However, this wording suggests x[1] allowed for optional elements - and this is redundant as just 'x' would be sufficient. To me that's ok, as when dfdl:occursCountKind='parsed' we don't use maxOccurs anyway, so any non-scalar is in fact treated as an array.
The issue here of course is not about the constant expression '1', but e.g., 'x[$myVar]', when $myVar might or might not have value 1 at runtime. In general you cannot tell.
If we believe there should be additional mention of this behavior later in the spec in section 23, then that could be added, but I don't think we should change this aspect of DFDL. I believe it actually makes implementations harder if one blurs the lines between scalars and arrays/optionals. Right now they are reasonably cleanly separated.
...mikeb