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

Re: New draft: css3-selectors

From: fantasai <fantasai@escape.com>
Date: Wed, 21 Mar 2001 18:03:54 -0500
Message-ID: <3AB9335A.74A94F5C@escape.com>
To: Daniel Glazman <glazman@netscape.com>, www-style@w3.org
Daniel Glazman wrote:
> 
> fantasai wrote:
> 
> > Re: 6.4.3 Default attribute values in DTDs
> >
> > I can conclude from the example that either
> >   a) There is no mechanism for matching implicit attribute values
> >      and the example just illustrates a workaround.
> > or
> >   b) The element selector, without an explicit attribute selector,
> >      matches only elements that have all attributes implicitly
> >      set to their default values. (Which is absurd.)
> >
> > Moreover, the example seems to contradict the third sentence ("W3C
> > selectors should be implemented so that they work even if the default
> > values are not included in the document tree."), which to me implies
> > that a selector "form[method=get]" will match
> > <form action="script.cgi">
> >
> > Am I reading this correctly? It's very confusing.
> 
> I'll start from the very beginning so all readers will follow.
> An attribute which is not present explicitly in the markup but has a
> default value assigned by its definition in the DTD is called
> "implicit". An implicit attribute is _always_ there, even if not visible
> in the markup and there is actually no way in *ML languages to force
> the removal of such an attribute. 

Oh, aye, I understand that. 

> Then selecting the element alone, with no other extra condition 
> on the attribute itself, is enough to select the element with 
> its default attribute value ser by DTD.

Selecting by specifying the element alone will *always* select the
element, regardless of what attributes are or are not present in 
the markup. (Or so I've been led to believe--until now.)
 
> Is that clearer ?

No. :)


Here's a selector:  form[method="get"]
Does it match <form action="script.cgi">?

I can conclude from the first paragraph in 6.3.4 that it does.

  "W3C selectors should be implemented so that they work
   even if the default values are not included in the 
   document tree"

Yet the example presented below that sentence implies that it doesn't!

  "If the selectors represent an EXAMPLE element when the
   value of the attribute is explicitely set: 
                             ^^^^^^^^^^^
     EXAMPLE[notation=decimal]
     EXAMPLE[notation=octal]
   
   then to represent the case where this attribute is set 
   by default, and not explicitly, the following selector 
   might be used:  ^^^^^^^^^^^^^^
     
     EXAMPLE
  "

*and* the last example implies that the following selector

  form

does not match <form action="script.cgi" method="post">--
which contradicts CSS1.
Received on Wednesday, 21 March 2001 18:02:54 GMT

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