
Hi, I think I understand Suman's issue with annotations on the Schema tree. (Please Suman tell me if I am right here). The problem is, that lexically there are many trees in an XSD. Whilst in practice these can clearly be considered as a single tree (including, I think, even the simple type hierarchies) by placing all the type definitions inline, this is not the way they appear to the user. So for example if I have a file with conflicting annotations looking like: <xs:complexType name="triple"> <xs:annotation> <xs:appinfo> <dfdlFromBinary/> </xs:appinfo> </xs:annotation> <xs:sequence> <xs:element name="first"/> <xs:element name="second"/> <xs:element name="third"/> </xs:sequence> </xs:complexType> <xs:complexType name="data"> <xs:annotation> <xs:appinfo> <dfdlFromStrings/> </xs:appinfo> </xs:annotation> <xs:sequence> <xs:element name="triple"/> </xs:sequence> </xs:complexType> So what I imagined is that we would assume that the "triple" type is considered _inside_ the scope of the "data" type and so the "dfdlFromBinary" tag wins. On the other hand the user sees two trees of equal depth with conflicting annotations. The examples can obviously get much more intricate. The issue is really that the scope of the annotations is not lexically defined. At some level this is just like having globally included variables in a programming language. On the other hand we have arbitrary levels of these. Suman is this the problem? If this is the problem, and we agree that it is too confusing to the user (my opinion is still out on this). Then I see that the conclusion is to adopt an approach similar to IBM's that annotations can appear only on <element> and <attribute> tags. Even the top level of the file is confusing since there may be many files involved. I guess we can also have runtime defaults and default settings set in the standard. I don't like this conclusion incidentally, can someone convince me it is the wrong one? Martin