Re: Backwards compatibility of new selectors

Neil St.Laurent wrote:
<<
That would make more sense, but then we definitely have a confusion
as to which is more appropriate:

/H1 P/

or

/H1 //P//

Would would appear to mean the same thing with your change to the
selector semantics.
>>

I was looking for ways to get rid of the '//' altogether. Without it,
contextual relationships can be described more logically. I would also like
to see a change in semantics. Is it not the case that relationships between
parent, child and siblings are all contextual relationships? So:
----
  1. Contextual relationships are relationships between an element and other
elements in the document tree, and can be of two types: ancestral
relationships (one element a descendent of another) and sibling
relationships (two elements with a common parent).

  2. An ancestral selector is made up of two or more selectors separated by
white space and/or a tilde.

  3. A sibling selector is made up of two selectors separated by white space
and/or a tilde, and contained within a pair of forward slashes.

  4. The tilde (~) narrows the scope of a contextual relationship.  When the
tilde is inserted between the relevant selectors, it restricts ancestral
relationships to parent-child elements and sibling relationships to
immediately-consecutive elements.
----

Which leaves the question of first and last elements. Suggestions include:

1. pseudo-classes; e.g. P:first, P:last, etc.

2. pseudo-attributes; e.g. P[first], P[last], P[2], etc.

3. pseudo-elements; e.g. DIV:first-child

4. another use of operators; e.g. DIV /~P/ (with the
'immediately-consecutive' operator alone implying that P is the firstmost
sibling)

<<I'm sure somebody would kill me if I suggested a more XSL like syntax
for selectors at this point... :)>>

Not me. I like to see possibilities.

<<I'm thinking maybe we should let the guys who wrote the standard mull
over this selector issue and get back to us on either a clarified or
a modified proposal.>>

Yep, this discussion has been almost as heavy as HSL nominations.

David Perrell

Received on Friday, 5 December 1997 14:10:33 UTC