W3C home > Mailing lists > Public > www-international@w3.org > January to March 2013

Re: Comment on ITS 2.0 specification WD - Uniquness of id value

From: Felix Sasaki <fsasaki@w3.org>
Date: Mon, 21 Jan 2013 09:13:29 +0100
Message-ID: <50FCF8A9.9050909@w3.org>
To: Norbert Lindenberg <w3@norbertlindenberg.com>
CC: Yves Savourel <ysavourel@enlaso.com>, public-multilingualweb-lt-comments@w3.org, 'www-international' <www-international@w3.org>
Am 21.01.13 09:06, schrieb Norbert Lindenberg:
> Hi Yves,
>
> I guess within ITS you're right. Where things break down is in the relationship with HTML id values (and possibly xml:id, whose spec I couldn't find).
>
> Let's assume the following HTML fragment:
>
> <body>
>    <p id=p1 class=class1>text...</p>
>    <p id=p2 class=class2>text...</p>
>    <p id=p3 class=class1>text...</p>
> </body>
>
> and ITS rule
>
> <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
>    <its:idValueRule selector="//p[@class='class1']" idValue="its1"/>
> </its:rules>
>
> If I understand correctly, this gives me an identifier "its1"

no, this gives you no identifier at all. "its1" is an XPath expression, see
http://www.w3.org/TR/2012/WD-its20-20121206/#idvalue-implementation
which evaluates to the empty string.

Felix

> for a selection that includes the first and third paragraph in the HTML fragment while excluding the second. I could do that because I'm using class attributes in the selector. I would not have been able to do this with HTML id attributes, even if I created additional <div> nodes, because the selection is discontiguous. So there's no clear relationship between ITS id values and HTML id values.
>
> Norbert
>
>
> On Jan 19, 2013, at 5:41 , Yves Savourel wrote:
>
>> Hi Norbert,
>>
>>> 8.15 Id Value
>>> - Different parts of this section seem contradictory: First, an id value
>>> is supposed to be a "unique identifier for a given part of the content",
>>> but then there's a selector that "selects the nodes to which this rule applies",
>>> with "nodes" in plural. If the selector selects multiple nodes, then the
>>> identifier isn't unique.
>> I'm not sure I understand the issue.
>>
>> The selector attribute selects the nodes to which the idValue attribute applies.
>>
>> The value of idValue is not the ID but an XPath expression to construct the ID. That ID can be the value of a local attribute for example, or a construction of a unique value as shown in example 72[1].
>>
>> cheers,
>> -yves
>>
>> [1] http://www.w3.org/TR/2012/WD-its20-20121206/examples/xml/EX-idvalue-element-2.xml
>>
>>
>>
>>
>>
>
Received on Monday, 21 January 2013 08:13:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 21 January 2013 08:13:59 GMT