You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Stephen Ng <st...@lumigent.com> on 2002/07/10 22:11:46 UTC

nested elements in esql logicsheets

After bashing my head a little trying to figure out how to use dynamic
tag parameters in esql, I finally figured it out and have a few
(constructive, I hope) suggestions.

Documentation:

1. http://xml.apache.org/cocoon/userdocs/xsp/logicsheet-concepts.html
contains a lot of information which is pretty important to using
logicsheets, not just for people writing them.  I'd prefer that it be
rewritten to target users, not writers, but at a minimum, *please*
remove (or move) the section on SiLLy--there's precious little doc as it
is on logicsheets, and including a large section on a still-in-design
component is very confusing to those of us getting started.

2. "Also, dynamic tag parameters must be accepted both as constant
strings and as (potentially complex) expressions."

This is, of course, a great great thing, a lifesaver.  But the example
given is:
  <util:parameter name="format">
    <xsp:expr>
      request.getParameter("format");
    </xsp:expr>
  </util:parameter>

To use this with esql, you must say:

  <esql:param ...>

BUT, it's "param" not "parameter"!  Also, it's not at all obvious that
the util and esql namespaces both contain an element named "param"; I
might have been tempted to use "util:param" in my esql sheet.

[That it's "esql:param" is not obvious from looking at esql.xsl--I
attempted to grep for "esql:param" and found nothing.  That's because
the code is written:

<xsl:value-of select="concat($prefix, ':param')"/>

Where $prefix (which is only used here!) is hard-coded to "esql"!

]

Code:

1. I could not get <xsl:message terminate="yes"> text to show up in the
.log file.  In my sitemap, I have:

<map:transformer logger="sitemap.transformer.xslt" name="xslt"
pool-grow="2" pool-max="32" pool-min="8"
src="org.apache.cocoon.transformation.TraxTransformer">

In logkit.xconf I have:

<category name="sitemap" log-level="DEBUG>

Is there another piece to the puzzle?

I managed to work around this by hacking together some
System.out.println's, so this is not an urgent problem for me.

2. It's my belief that SQLWarning's are totally ignored by
EsqlQuery.java, and, therefore, there is no way for esql users to see
any warnings if they occur. (see, for example
http://java.sun.com/docs/books/tutorial/jdbc/basics/complete.html --
getWarnings() is a method of the (private)
connection/statement/resultset object.

Can someone confirm this?

That's all!

--Steve


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


[ANNOUNCEMENT] Second Open Content Management Conference

Posted by Michael Wechner <mi...@wyona.org>.
Dear Group

OSCOM is organizing the Second Open Source Content
Management Conference in Berkeley, California, USA, from 25 - 27
September 2002. Registration for this second conference is now open. For
more details see
http://www.oscom.org/conferences/sanfrancisco2002/index.html

Cocoon will be represented by DBPrism and Wyona.

Ted Nelson will give the keynote.

BTW: OSCOM is powered by Cocoon

Please spread the word about this new conference and help us make it a
success.

Thanks a lot

Michael


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: nested elements in esql logicsheets

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 10.Jul.2002 -- 04:11 PM, Stephen Ng wrote:
> remove (or move) the section on SiLLy--there's precious little doc as it

Gosh, it's still there?! It wasn't WIP anymore when I started two
years ago...

> 2. "Also, dynamic tag parameters must be accepted both as constant
> strings and as (potentially complex) expressions."
> 
> This is, of course, a great great thing, a lifesaver.  But the example
> given is:
>   <util:parameter name="format">
>     <xsp:expr>
>       request.getParameter("format");
>     </xsp:expr>
>   </util:parameter>
> 
> To use this with esql, you must say:
> 
>   <esql:param ...>
> 
> BUT, it's "param" not "parameter"!  Also, it's not at all obvious that

Indeed, it uses "parameter" for PreparedStatement parameters. AFAIK
most (all?) logicsheets use "param". The bigger inconsistency is that
it uses "column" to dynamically specify a column where it should use
"param name='column'"...

> the util and esql namespaces both contain an element named "param"; I
> might have been tempted to use "util:param" in my esql sheet.

Thought it was documented..... will check.

> [That it's "esql:param" is not obvious from looking at esql.xsl--I
> attempted to grep for "esql:param" and found nothing.  That's because
> the code is written:
> 
> <xsl:value-of select="concat($prefix, ':param')"/>
> 
> Where $prefix (which is only used here!) is hard-coded to "esql"!
> 
> ]

mid-term goal would be to move to logicsheet-util.xsl for those
functions. Anyone interested in doing it? :-)

> 2. It's my belief that SQLWarning's are totally ignored by
> EsqlQuery.java, and, therefore, there is no way for esql users to see
> any warnings if they occur. (see, for example
> http://java.sun.com/docs/books/tutorial/jdbc/basics/complete.html --
> getWarnings() is a method of the (private)
> connection/statement/resultset object.
> 
> Can someone confirm this?

Yes, they are not used. Suggest a syntax (or provide a patch :-) and
we'll see....

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


[ANNOUNCEMENT] Second Open Content Management Conference

Posted by Michael Wechner <mi...@wyona.org>.
Dear Group

OSCOM is organizing the Second Open Source Content
Management Conference in Berkeley, California, USA, from 25 - 27
September 2002. Registration for this second conference is now open. For
more details see
http://www.oscom.org/conferences/sanfrancisco2002/index.html

Cocoon will be represented by DBPrism and Wyona.

Ted Nelson will give the keynote.

BTW: OSCOM is powered by Cocoon

Please spread the word about this new conference and help us make it a
success.

Thanks a lot

Michael


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>