- From: Melvin Chin <mc@SoftOffice.Net>
- Date: Fri, 29 Sep 2006 10:20:20 +0800
- To: www-xml-schema-comments@w3.org
I'd like to suggest 2 points for consideration. (1) Making Globality of elements explicit. (2) Making the (only) validation root element explicit (1) & (2) are related. In the past, the need to allow a designated element in xschema to be validated against incoming instances is to physically place it at the top-most layer. Unfortunately, the desire to make elements global for sharing or references also go through the same mechanism of placing them at the top-most layer. Therein lies the problem that elements intended only for sharing "internally" (within that same schema) now becomes possible targets for validation. This certainly implies that the set of allowed instances has quietly expanded to include all those elements placed at the top layer. On the other hand, the element intended for validation and may be desirable to be kept non-referenceable by that schema or derived schemas must necessarily be exposed as global at present. (1) suggests that we declare a keyword attribute such as "global='entire|this'" where global=entire means globality at the entire schema level (with all imports, include, or the larger schema that encloses this schema) and global=this means globality within just this schema. (2) suggest that we either declare a keyword attribute such as "validate=true" on the element (not necessarily global=either|this) which we want to be exposed to schema validator against instances. Another way (one or the other, not both ways suggested) would be to have something like <xsd:validation><xsd:root>Invoice</>...</> to indicate element "Invoice" is the only element validator needs to validate incoming instances against. The latter structure permits further directives and data to be sent to the schema validator during validation time, and is more recommended. For your kind consideration, please. cheers.
Received on Friday, 29 September 2006 02:20:00 UTC