Re: Selecting selectors

<spam style="display:inline">
The last mail I wrote was surrealistic?....
I closed a list recently, it was 00000001@onelist.com....
That was surreal....
</spam>

Ian Hickson escribió:

> On Sun, 14 Mar 1999, Ignacio Javier wrote (in a rather surreal moment):
>
> >  <h1>
> >      <p>
> >     I'm not a paragraph that involves easily with bad guys. In fact I
> > love one paragraph ...his name is .... is..I love a not selectable
> > paragraph?
> >     </p>
> >  </h1>
>
> (I assume this is not HTML.  If this is HTML, then the above is invalid.)
>
> That paragraph can be selected with the following selector:
>
>    h1 p
>
> ...or
>
>    h1 > p
>
> ...or

>    p:first-child

ok

>
> > <p>
> >  I'm cool, I'm a good guy, but someone is using my personality!??? I
> >  fact I'm the paragraph loved by the one above, his name is h1 > p ....
> > </p>
>
> That would be h1 + p, I think.
>

I would get the last Bad P too

>
> > <h1>
> > </h1>
> > <p>
> > I'm a very bad guy, but fortunatelly people confuses me with the
> > paragraph above, ha ha!!!
> > </p>
>
> The first one can be selected by
>
>    h1:first-child + p
>

suppose you mean p:first-child + p
but...

>
> ...or, if we use my suggestion from a few months back of a pseudo-class
> selector :contains,
>
>    h1:contains(P) + P
>

I need to clarify the following: (excuses if I use bad terminology):
 If you want a selector sintax to be capable of complex selecions it might be
able to select in base to structures. I mean, if you have a document in a
stable way (loaded) then you can have all info about structure on it, and
¿why not  refer to selectors by tree?: Example:

(h1 > p) + p

h1>p will refer to p that.....
h1:contains(p) will refer to h1 that....

but more generic (...) denote tree structure and so:

(h1 > p) + p denotes a p that has sibling relation with an h1 that has a p
child in structure

p < h1

will denote as selected an h1 that has a p as child

but:

(p < h1) would be equal to (h1 > p)

More:

you can use:

((p+(p em))<h1

to denote selecting h1 in a structure that has as childs 2 contiguous <p> and
a <em> as descendant of the second

I love to see all that implemented in Microsoft , Netscape and Opera. Let's
follow standards.  And today is my birthday .
(Some of what I said is a lie, some is probably impossible and some is an
utopy. And I do not really matter some of what I said....)

Received on Tuesday, 16 March 1999 18:45:23 UTC