http://jakarta.apache.org/taglibs/doc/standard- doc/DB_FunctionalDescription_1_EA3.html describes three ways to access a DataSource from JSTL, the first being Transparent collaboration, where an initialization servlet or whatever initializes a magic attribute to a valid DataSource. In attempting to use that facility, I discovered that this facility does not appear to work at all in EA3. I was able to get it to work in the latest nightly build, but I had to read the source to discover that instead of actually using the attribute javax.servlet.jsp.jstl.sql.dataSource, it used the attribute named by whatever the parameter javax.servlet.jsp.jstl.sql.dataSource is set to. This is probably on purpose, I would guess, but the documentation should be changed to reflect that.
Your interpretation of the spec is correct. The scoped variable should be used. Fixed in the beta1 nightly build.