balld 01/05/17 18:02:01
Modified: src/org/apache/cocoon/components/language/markup/xsp/java
esql.xsl
Log:
patch from Sergio Carvalho for testing null columns
Revision Changes Path
1.2 +6 -1
xml-cocoon2/src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl
Index: esql.xsl
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- esql.xsl 2001/05/09 20:49:53 1.1
+++ esql.xsl 2001/05/18 01:02:00 1.2
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!-- $Id: esql.xsl,v 1.1 2001/05/09 20:49:53 giacomo Exp $-->
+<!-- $Id: esql.xsl,v 1.2 2001/05/18 01:02:00 balld Exp $-->
<!--
============================================================================
@@ -842,6 +842,11 @@
<xspdoc:desc>returns the name of the type of the given column. the column
must be specified by number, not name.</xspdoc:desc>
<xsl:template match="esql:row-results//esql:get-column-type-name">
<xsp:expr><xsl:call-template
name="get-resultset"/>.getMetaData().getColumnTypeName(<xsl:value-of
select="@column"/>)</xsp:expr>
+</xsl:template>
+
+<xspdoc:desc>allows null-column testing. Evaluates to a Java expression,
which is true when the referred column contains a null-value for the current
resultset row</xspdoc:desc>
+<xsl:template match="esql:row-results//esql:is-null">
+ <xsp:expr>((<xsl:call-template
name="get-resultset"/>.getObject("<xsl:value-of select="@column"/>") == null)
|| <xsl:call-template name="get-resultset"/>.wasNull())</xsp:expr>
</xsl:template>
<xspdoc:desc>returns the message of the current exception</xspdoc:desc>
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]