Re: [all] definition of identical selections

Hi Dave,

2012/9/4 Dave Lewis <dave.lewis@cs.tcd.ie>

> Hi all,
> Quick query - in the specification, section:
> http://www.w3.org/**International/multilingualweb/**
> lt/drafts/its20/its20.html#**selection-precedence<http://www.w3.org/International/multilingualweb/lt/drafts/its20/its20.html#selection-precedence>
>
> there is a note that says:
> "If identical selections are defined in different rules elements within
> one document, the selection defined by the last takes precedence."
>
> Can anyone confirm that an 'identical selection' means that the set of
> matching nodes is identical, after other precedence rules and overrides
> have been calculated, rather than meaning the just the value of the
> selector attribute is identical?
>

Actually no. Precedence and overrides are not separate - override is one
part of precedence - and selection via global rules too. See the list at
http://www.w3.org/International/multilingualweb/lt/drafts/its20/its20.html#selection-precedence

Probably, this
"Selections via defaults for data categories, see Section 6.1: Position,
Defaults, Inheritance and Overriding of Data
Categories<http://www.w3.org/International/multilingualweb/lt/drafts/its20/its20.html#datacategories-defaults-etc>
"
Should be changed to
"Selections via defaults or inherited values (if applicable) for data
categories, see Section 6.1: Position, Defaults, Inheritance and Overriding
of Data Categories<http://www.w3.org/International/multilingualweb/lt/drafts/its20/its20.html#datacategories-defaults-etc>
"

 You can see the list at
http://www.w3.org/International/multilingualweb/lt/drafts/its20/its20.html#selection-precedence

Reformulating this as a list of if-then-else statements, this would be: for
a given node N-n:
1) IF for a given node N-n there is local markup for the data category
processed, this is what is applied. ELSE
2) IF for the given node N-n there is a global rule which matches that
node, the information from that rule is applied to N-n. If there are
several rules, the last rule provides the information. ELSE
3) IF there are inherited values, they apply to the node N-n. ELSE
4) IF there are default values, they apply to the node N-N. ELSE
5) There is no value for the node.

Now, wrt to your question: the XPath expressions can be different but still
there can be a conflict. E.g.
all "p" elements //p
the first "p" element //p[@id='p1']
the 2nd XPath expression matches a node that is also matched by the first
expression. So for this node, "If there are several rules, the last rule
provides the information." applies. For the other "p" nodes, there is no
conflict - they are just matched by //p


> If so, it might be worth revisiting definition of 'selection' in;
> http://www.w3.org/**International/multilingualweb/**
> lt/drafts/its20/its20.html#**def-selection<http://www.w3.org/International/multilingualweb/lt/drafts/its20/its20.html#def-selection>
>
> This seems to refer to 'selection' as a mechanism (i.e as a verb). The
> current definitions might better suit 'selection mechanism' while
> 'selection' could be defined as the set of document nodes matching a given
> selector.
>

Not sure - it's not really a set, it is rather from the perspective of a
single node.

Best,

Felix


>
> cheers,
> Dave
>
>
>


-- 
Felix Sasaki
DFKI / W3C Fellow

Received on Tuesday, 4 September 2012 13:03:00 UTC