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 5707 - clarify SML reference resolution when sml:uri value is an empty string
Summary: clarify SML reference resolution when sml:uri value is an empty string
Status: RESOLVED FIXED
Alias: None
Product: SML
Classification: Unclassified
Component: Core+Interchange Format (show other bugs)
Version: LC
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Kumar Pandit
QA Contact: SML Working Group discussion list
URL:
Whiteboard:
Keywords: needsReview
Depends on: 5542
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-22 01:06 UTC by Kumar Pandit
Modified: 2008-07-03 02:48 UTC (History)
2 users (show)

See Also:


Attachments

Description Kumar Pandit 2008-05-22 01:06:30 UTC
Our spec says that an SML ref with only a fragment in its URI, targets an element (pointed to by the fragment) within the document that contains the reference. The spec is silent about the case where the value of sml:uri is an empty string. I think, this points to the root element of the document that contains the reference. This would be consistent with RFC 3986 (section 4.4 Same-document Reference). 
  
In other words, all of the refs below point to the same target.   
  
a.xml 
----- 
<x:root xmlns:sml="http://www.w3.org/2008/03/sml" xmlns:x="urn:x"> 
    <x:ref sml:ref="true"> 
        <sml:uri>a.xml</sml:uri> 
    </x:ref> 
    <x:ref sml:ref="true"> 
        <sml:uri>a.xml#smlxpath1(/x:root)</sml:uri> 
    </x:ref> 
    <x:ref sml:ref="true"> 
        <sml:uri>#smlxpath1(/x:root)</sml:uri> 
    </x:ref> 
    <x:ref sml:ref="true"> 
        <sml:uri></sml:uri> 
    </x:ref> 
</x:root>

Proposal:
Update section 4.3.1 SML URI Reference Scheme in the SML spec and section 5.3.4 URI Reference Processing bullet 1.a appropriately to clarify the case mentioned above.
Comment 1 Pratul Dublish 2008-05-22 19:39:45 UTC
Discussed in 5/22 call
Kumar to update the bug with a new proposal
Comment 2 Kumar Pandit 2008-06-05 06:53:03 UTC
Proposal:
[1]
Add the following non-normative note after 2.b in 4.3.1 SML URI Reference Scheme

Note: If the relative reference is an empty string or if it consists of only a fragment component then step 2.b is skipped because the document containing the SML reference is the target document.

[2]
Change 1.a in section 5.3.4 URI Reference Processing:

From:
If UR contains only a fragment component, then D is the model document that contains UR.

To:
If UR is an empty string or if it contains only a fragment component, then D is the model document that contains UR.
Comment 3 Sandy Gao 2008-06-12 20:14:01 UTC
The WG discussed this issue at its 2008-06-12 telecon. A few observations about the first change suggested in comment #2:
1. When the original reference is empty or only has fragment component, then both 2.a and 2.b should be affected.
2. It's not clear that the suggested note (non-normative) is a consequence of normative statements. There may need to be more changes to achieve the desired effect.
3. The actual wording changes for this bug may depend on the resolution of bug 5542.
Comment 4 John Arwe 2008-06-24 09:26:33 UTC
(f2f consensus)
SML 4.3.1 2 b replacement
A document is obtained by one of the following methods. (2.b.1) by recognizing that the relative reference is a same-document reference (2.b.2) by dereferencing the URI reference ignoring any fragment component, using the appropriate operation defined for the URI scheme used in that URI reference. If a document in the current model does not result, the SML URI Reference Scheme instance is unresolved.

SMLIF 5.3.4 1 a 
from: If UR contains only a fragment component     ,
to  : If UR is            a same-document reference [rfc 3986 section 4.4],

editors to mark this needsReview after text is drafted
Comment 5 Kumar Pandit 2008-07-03 02:48:17 UTC
fixed per comment# 4.