I dont have much to offer but I will commiserate with you. I just noted that
java codes have been moved around in 2.1-dev to organized to blocks, and yes
files like EsqlHelper.java has gotten larger comparing 2002/07/05 to
2002/11/21.
I have not checked the 2.0.1 vs 2.0.3 versions, so there could be changes
between there too.
For the dev version, there are no EsqlConnection.java but has changed to
AbstractEsqlConnection.java, it does the functionality I guess since it
implements Connection. Anyhow, FOR THE DEVELOPERS, CAN YOU PLEASE RE-INSTATE
javadoc DOCUMENTING like the version as a reference for us struggling to
follow? Or are those done only when you get a release version?
Regards,
aps
--- Luis Gois [EMAIL PROTECTED] wrote:
Hello.
I'm facing a situation where I've tried almost everything and don't
understand why ESQL doesn't work for a particular situation :
a) I have 3 cascading queries, i.e., the 2nd query placed inside
esql:row-results of 1st query and 3rd query inside esql:row-results of
2nd query;
b) for the 3rd query, something strange happens :
1) Cocoon 2.0.2 :
Using esql:get-string (2nd line from bottom):
===
!-- 3rd query --
esql:execute-query
esql:query
select aqa.nu_qms_activity_area
asnum_activity_area, aqa.name_qms_activity_area as name_activity_area
FROM opqa_metrics_tst omt, activities_qms_areas
aqa
WHERE omt.nu_descr_metrics_tst=esql:get-int
column=nu_descr_metricas_tst ancestor=1/
AND
omt.name_project_tst='xsp:exprcurrentProduct/xsp:expr'
AND omt.name_release_project in
xsp:exprreleasesSet/xsp:expr
AND
TO_CHAR(omt.date_input,'dd-mm-')='xsp:exprcurrentDate/xsp:expr'
AND aqa.nu_qms_activity_area =
omt.nu_qms_activity_area
order by num_activity_area asc
/esql:query
esql:results
esql:row-results
metric
xsp:attribute
name=namexsp:exprmetricName/xsp:expr/xsp:attribute
!-- === HERE IT IS
== --
xsp:attribute
name=activity_areaesql:get-string
column=name_activity_area//xsp:attribute
xsp:logic
(...)
the generated java is:
=
xspAttr.addAttribute(
,
activity_area,
activity_area,
CDATA,
String.valueOf(.getBytes() != null ?
EsqlHelper.getStringFromByteArray(.getBytes (), ) : )
);
Findings :
Looking at the esql.xsl, I see that the xsl:choose element at
get-encoded-string template isn't properly processed when retrieving a
value for the encoding variable, since even if I use esql:get-string
column=name_activity_area encoding=default/, $encoding won't
default to 'default'. If I copy that xsl:choose element outside the
variable element do debugging purposes and watch at the generated java,
I see that it correctly evaluates to a default value situation
(xsl:otherwise). Again, specifying the encoding attribute in
esql:get-string and then retrieving at the esql.xsl file the $encoding
and @encoding values, the first is '' and the second 'default'. How can
this be possible?
Using esql:get-string in previous queries had a completely
diferent JAVA code replacement, using getAscii() method for example. The
call to esql:get-string has exactly the same attributes, the column
types are exactly the same (though at XML-JAVA code transformation
that's irrelevant).
Moving to Cocoon 2.0.4 didn't solve this problem. Now, the
generated JAVA file has have something like
EsqlHelper.getStringFromByteArray(default.getBytes()) -- notice at the
default object. The error generated at compile time is related to
getStringFromByteArray() method not found in EsqlHelper class. (I can
give you more detailed error messages later, since those errors where
generated yesterday night at work).
I thought that I was using a bad Xalan in my classpath or
something similar but I've tried the code in 2 different platforms, an
HP-UX and a Win2K machine and both generated the same java code and the
same compilation errors.
This is really frustrating for me, a Cocoon1 Vet and for the
persons who are now using Cocoon for the first time. I've developed some
of applications in our project and never experienced this behaviour, but
now, I'm lost!:( Help ...
Regards,
Luis Gois