This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
When none of the reference representation schemes used in a reference element are understood by an implementation, it is effectively a null reference in the context of that implementation. This case should be included in the definition of a null reference.
I am not sure whether this should be a null ref or a dangling (unresloved) ref.
Discussed at 2007-08-29 F2F. The WG decided not to introduce a new attribute called "sml:nilref" with a boolean value to indicate whether a reference is null. This is the only case a reference is recognized as "null".
Correction to comment #2: it should read "The WG decided to introduce a new attribute ...". Note the removal of "not".
Sandy, Kumar, please review the changes ( they are already checked in CVS ) See description of changes below and attached html file containing the described changes Changes: 1. create a new nilref attribute : <!-- CONTEXT: To be used in any <xs:element> --> <xs:attribute name="nilref" type="xs:boolean"> <xs:annotation> <xs:documentation> Specifies that the reference element denotes a null reference. To be used only on elements for which sml:ref="true". </xs:documentation> </xs:annotation> </xs:attribute> 2. Modified the SML documentation as follows: - Null reference definition : 3.1.1.2 Null Reference A reference element with sml:nilref="true" specified. A null reference is an explicit declaration of intent by the producer that the reference itself does not exist, and a processing directive (NOT a hint) to consumers not to search the reference for reference scheme information items. Any scheme-related content, including attributes, recognized by the consumer is ignored for reference-related purposes. - Added a new section under the Attributes section 7.1.3 sml:nilref This global attribute is used to identify null reference elements. This attribute is only allowed on elements that have sml:ref="true" specified. <xs:attribute name="nilref" type="xs:boolean"/> Any element that has sml:nilref="true" will be treated as a null reference element. Consumers MUST not attempt to resolve reference element which are recognized as null. Any scheme-related content, including attributes, recognized by the consumer is ignored for reference-related purposes. - updated targetRequired section to flag an error when nilref is specified: 7.1.5 sml:targetRequired Used to specify that instances of a reference element must target elements in the model, i.e., an instance of the reference element can not be null or contain an unresolved reference which does not target any element in the model. >>>>Therefore it is an error if targetRequired="true" is specified on an element declaration and the corresponding reference element R has sml:nilref="true" specified.<<<<
Created attachment 485 [details] updated SML spec
Overall the changes look good. I have a few suggestions: 1. 3.1.1.2 Null Reference : Since the SML spec does not define a producer or a consumer, it will be better to avoid the terms to define a null reference. Suggested alternative definition: A reference element with sml:nilref="true" specified. A null reference is an explicit declaration of intent that the reference does not target any element. Any scheme-related content, including attributes, if present, is ignored. 2. We may want to add text to clarify the case of non-null refs that do not contain any recognizable scheme. That is, if nilref='true' is not present then, by definition, the ref must point somewhere, therefore if there is no recognized scheme present then the ref is treated as unresolved.
Updates based on Kumar's and Pratul's comments ( Pratul comments sent on the sml public mailing list ) : 1. Rephrased the null reference and took out the consumer/producer references. Based on Pratul's comments also included the sml:nilref="1" as a valid value The new definition : 3.1.1.2 Null Reference A reference element that has either sml:nilref="true" or sml:nilref="1" specified. A null reference is an explicit declaration of intent that the reference does not target any element. Any scheme-related content, including attributes, if present, is ignored. 2. Updated the Unresolved reference definition based on the f2f discussion. New definition : 3.1.1.3 Unresolved Reference A non-null reference for which one of the following applies: * No scheme used in the reference can be recognized. * None of the recognized schemes resolves. * A scheme or multiple schemes resolve to more than one target. I am closing the defect as fixed
Looks good - recommend approval