W3C home > Mailing lists > Public > www-style@w3.org > April 2001

Re: Does :target pseudo-class apply to XML documents?

From: Sampo Syreeni <decoy@iki.fi>
Date: Sun, 22 Apr 2001 13:37:23 +0300 (EEST)
To: Elliotte Rusty Harold <elharo@metalab.unc.edu>
cc: <www-style@w3.org>
Message-ID: <Pine.SOL.4.30.0104221333360.4801-100000@kruuna.Helsinki.FI>
On Sat, 21 Apr 2001, Elliotte Rusty Harold wrote:

>The description of the :target pseudo-class in CSS3 module: W3C
>selectors leaves a number of questions open. In particular:
>
>1. Does it only work in HTML where there are well-defined target
>attributes, or does it work in XML too?

AFAIK, it's meant to work in any environment where the application is
capable of telling what a *:target is. In fact, HTML usually isn't one of
these, since the client will not always know which elements are pointed at
from another document. When the document is arrived at via a reference, then
we know, not otherwise.

>2. Why not just use the attribute selectors on target attributes?

:target and [class="id"] are two completely separate things. The first only
applies when the id is actually referenced.

>3. Is it perhaps because the target selector only works after you've
>followed a link from the referring URI to the targetted element?

Aye. Only, in some environments (like a closed HyTime system), the app will
know even if we're not following a link. XLink with detached link databases
is another example.

Sampo Syreeni, aka decoy, mailto:decoy@iki.fi, gsm: +358-50-5756111
student/math+cs/helsinki university, http://www.iki.fi/~decoy/front
Received on Sunday, 22 April 2001 06:37:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:09 GMT