W3C home > Mailing lists > Public > public-multilingualweb-lt-comments@w3.org > January 2013

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

From: Yves Savourel <ysavourel@enlaso.com>
Date: Mon, 21 Jan 2013 05:35:53 -0700
To: <public-multilingualweb-lt-comments@w3.org>
CC: "'www-international'" <www-international@w3.org>
Message-ID: <assp.0733530f09.assp.073311cc01.00a601cdf7d3$da7b5b90$8f7212b0$@com>
Hi Norbert,

> <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"

As Felix already pointed out, this example doesn't really attach ID values to the selected elements.

The rule:

<its:rules xmlns:its="http://www.w3.org/2005/11/its"
 xmlns:h="http://www.w3.org/1999/xhtml" version="2.0">
   <its:idValueRule selector="//h:p[@class='class1']" idValue="@id"/> 

would be more in line with the expected usage of the data category. It associates the ID value 'p1' with the first element selected and 'p3' with the last one.

But in any case, In HTML, the attribute id is the one which does take precedence anyway, so the rule would be overridden for all three of the paragraphs in the example. This is defined in the second bullet of the GLOBAL section (http://www.w3.org/TR/2012/WD-its20-20121206/#idvalue-implementation).

> (and possibly xml:id, whose spec I couldn't find).

The specification for xml:id are here:

Received on Monday, 21 January 2013 12:36:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:32:26 UTC