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 5760 - definitions and uses of "target" disagree
Summary: definitions and uses of "target" disagree
Status: RESOLVED FIXED
Alias: None
Product: SML
Classification: Unclassified
Component: Core (show other bugs)
Version: LC
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Virginia Smith
QA Contact: SML Working Group discussion list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-16 17:13 UTC by John Arwe
Modified: 2008-08-14 18:13 UTC (History)
1 user (show)

See Also:


Attachments

Description John Arwe 2008-06-16 17:13:38 UTC
I believe this is an editorial issue.

In the current editor's draft, one finds the following:

2.2 Terminology
SML Reference Scheme      An SML Reference Scheme is a set of rules defining the syntax used to create an instance of the reference scheme in the context of an SML reference, plus a set of rules for resolving an instance of the reference scheme to a set of target element nodes. 

Target    An element in a model to which an SML reference resolves is called the target of that SML reference.

4.1.4 SML Reference Target
The node set that a non-null SML reference resolves to is its target. The target of an SML reference MUST be part of the same SML model as the SML reference. Null SML references have no target.

4.2.1 At Most One Target
Every non-null SML reference MUST target at most one element in a model. This means that each recognized reference scheme used in the SML reference MUST NOT resolve to more than one target. 

4.3 SML Reference Schemes
2. The set of rules that, when evaluated, resolve the SML reference to a set of target element nodes.

4.3.1.1 smlxpath1() scheme
6. The element(s) targeted by a scheme instance are obtained by applying the location path

4.2.6 Deterministic Evaluation of SML Constraints
...
   1.      The reference must have at most one target. [4.2.1 At Most One Target]

4.2.7 sml:deref() XPath Extension Function
ii. If at least one of the attempted reference schemes resolves to more than one target element, then 0 or 1 of the targets is added to O.
iii. If one attempted reference scheme resolves to a target different from the target resolved by another attempted reference scheme, then 0 or 1 of the targets is added to O.
iv. If one attempted reference scheme resolves and another doesn't, then 0 or 1 of the targets is added to O.
v. If none of the above is true (that is, all attempted reference schemes resolve to the same one and only one target element, call it T), then one target element (namely, T) is added to O, if it does not already exist in O.

There are also uses of target after this point, however they all appear to be in the context of target* constraints, hence they are covered by 4.2.6 (above).

5.1 Constraints on SML References
sml:targetRequired 	Used to specify that an SML reference's target element is required to be present in the model.
sml:targetElement 	Used to constrain the name of the SML reference's target.
sml:targetType 	Used to constrain the type of the SML reference's target.

Note the mixture of node-set, single element, target element nodes, and the apparent assumption in deref that a target is at most 1 element.
Comment 1 John Arwe 2008-06-16 17:44:44 UTC
Proposal:

2.2 Terminology, SML Reference Scheme      
from: an instance of the reference scheme to a set of target element nodes. 
to:   an instance of the reference scheme to a        target              . 

2.2 Terminology, Target    
from: An element                    in a model 
to:   The node-set of element nodes in a model 
from: to which an          SML reference resolves is
to:   to which a  non-null SML reference resolves is

4.1.4 SML Reference Target 
from: The node set                  that a non-null SML reference resolves to 
to  : The node-set of element nodes that a non-null SML reference resolves to 
...is its target. 

4.2.1 At Most One Target 
from: MUST NOT resolve to more than one target                             . 
to  : MUST     resolve to a             target containing zero or one nodes.

4.3 SML Reference Schemes
from: resolve the SML reference to a set of target element nodes.
to:   resolve the SML reference to a        target.

4.3.1.1 smlxpath1() scheme (no changes needed, if changes above made)

4.2.6 Deterministic Evaluation of SML Constraints
from:    1.      The reference must   have at most one target . 
to  :    1.      The reference must target at most one element. 

4.2.7 sml:deref() XPath Extension Function, item ii
from: resolves to 
to  : targets
from: target element
to  : element
from: the targets
to  : the elements
(new version then is)
ii. If at least one of the attempted reference schemes targets more than
one element, then 0 or 1 of the elements is added to O.

4.2.7 sml:deref() XPath Extension Function, item iii, iv, v
No change; because of ii, each target consists of at most one element node.
Comment 2 John Arwe 2008-06-24 09:33:32 UTC
f2f consensus

proposal in comment 1 REJECTED

workgroup prefers to take the approach of defining target as an element node instead of a node-set.  changes are limited enough in scope to make this editorial with needsReview after the changes have been drafted.
Comment 4 Pratul Dublish 2008-08-07 18:52:06 UTC
Per resolution in 8/7 call