Re: [SAC] ConditionFactory.createClassCondition

* Oliver Becker wrote:
>I'm currently playing with implementing the SAC API and stumbled upon the method createClassCondition in the ConditionFactory class
>http://www.w3.org/Style/CSS/SAC/doc/org/w3c/css/sac/ConditionFactory.html#createClassCondition_java.lang.String__java.lang.String_

Note that SAC has not been maintained for at least half a decade.

>I suppose (since it is not explained in more detail) this method serves the purpose to create a condition of the form .class.
>However, the namespaceURI parameter doesn't make any sense to me (I would expect a similar method signature as for createIdCondition).

That method is over 12 years old. Back then some people thought XHTML
should have different namespaces for Strict, Transitional, and Frame-
set. You could try asking Philippe about it, but I would suggest to
attribute it to "better safe than sorry" thinking, since passing, say,
null as namespaceURI is easier than having to update the signature to
allow for a namespace parameter, should one be needed in the future.

>BTW: this and many other methods throw a CSSException "if this exception is not supported".
>I can't make any sense of this sentence. What is "this exception"?

The author probably meant "method" or "condition", but wrote the wrong
word and copied and pasted it all over the place.

Note that the basic idea behind SAC is unsound, in order to make some
generic interface you would have to have some stable syntax, but the CSS
Syntax is not stable at all, even the "promised to never change" core
syntax is changed quite regularily, so you would end up in update hell
trying to maintain a generic interface while keeping old applications
using it working while providing new applications semi-convenient to all
the latest features. That's also why there are no decent tools to pro-
cess style sheets. So, whatever problem you are meaning to solve, SAC is
unlikely to help.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Saturday, 19 May 2012 22:54:03 UTC