This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 4884 - update the definition of a null reference to include the unimplemented-schemes case
Summary: update the definition of a null reference to include the unimplemented-scheme...
Status: RESOLVED FIXED
Alias: None
Product: SML
Classification: Unclassified
Component: Core (show other bugs)
Version: FPWD
Hardware: PC All
: P1 normal
Target Milestone: Second draft
Assignee: Valentina Popescu
QA Contact: SML Working Group discussion list
URL:
Whiteboard: SML references
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-26 06:50 UTC by Kumar Pandit
Modified: 2008-06-05 18:57 UTC (History)
1 user (show)

See Also:


Attachments
updated SML spec (149.25 KB, text/html)
2007-09-05 21:20 UTC, Valentina Popescu
Details

Description Kumar Pandit 2007-07-26 06:50:50 UTC
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.
Comment 1 James Lynn 2007-07-26 13:05:25 UTC
I am not sure whether this should be a null ref or a dangling (unresloved) ref.
Comment 2 Sandy Gao 2007-08-29 19:38:23 UTC
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".
Comment 3 Sandy Gao 2007-08-29 19:47:58 UTC
Correction to comment #2: it should read "The WG decided to introduce a new attribute ...". Note the removal of "not".
Comment 4 Valentina Popescu 2007-09-05 21:18:09 UTC
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.<<<<




Comment 5 Valentina Popescu 2007-09-05 21:20:59 UTC
Created attachment 485 [details]
updated SML spec
Comment 6 Kumar Pandit 2007-09-06 00:35:08 UTC
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.

Comment 7 Valentina Popescu 2007-09-06 02:34:34 UTC
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
Comment 8 Pratul Dublish 2007-09-17 15:42:16 UTC
Looks good - recommend approval