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

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 

No.
> where there are well-defined target
> attributes, or does it work in XML too?

Tt specifically is designed to work in XML. Something else (a link
processor) decides where link target or targets are (same for :link in
CSS2, which is not the same as a:link)
 
> 2. Why not just use the attribute selectors on target attributes?

Because they might not have any. If I write an XLink with an XPointer that
points at some otherwise unmarked bit of an XML document (even a substring)
what would be the attribute selector?

> 3. Is it perhaps because the target selector only works after you've
> followed a link from the referring URI to the targetted element?
> 
> 4. And if that's the case, this might make sense for XML when the URI
> links had XPointer fragment identifiers. 

Right.

> In which case, this is not so
> much about the target as the fragment identifier and perhaps the
> pseudo-class should be renamed to make that clearer?
> 
> Whatever the answers to these questions are, I think the spec could be a
> lot clearer about the intended behavior.

Okay, thank you. Good feedback.

-- 
Chris

Received on Sunday, 22 April 2001 16:24:47 UTC