cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <h...@dvs1.informatik.tu-darmstadt.de>
Subject [C2] stylesheet expansion problem
Date Fri, 20 Apr 2001 12:30:51 GMT
Hi.

I'd like to build a taglib that layers on top of esql. However, when I
try to pass an argument to it, it appears only as string value, not as
an expression (see attached files for complete source):

	 <test:liste-groups-for-uid>   
	    <test:param name="uid"><xsp:expr>uid</xsp:expr></test:param>

with ("get-parameter" being a verbatim copy from "xsp.xsl")

  <xsl:template match="test:liste-groups-for-uid">
    <xsl:variable name="uid">
      <xsl:call-template name="get-parameter">
        <xsl:with-param name="name">uid</xsl:with-param>
      </xsl:call-template>
     </xsl:variable>
     <!--  <xsl:copy-of select="$uid"/> will print the correct value -->
     <xsl:for-each select="test:row-results">
     <xsl:call-template name="apply-query">
        <xsl:with-param name="query">select * from userGroup ug, Group g where ug.gid=g.gid
and  
        uid=<xsl:copy-of select="$uid"/> </xsl:with-param>
     </xsl:call-template>

results in

      _esql_query.query = String.valueOf("select * from userGroup ug, Group g where ug.gid=g.gid
and uid=uid");

while

	       <esql:query>select * from userGroup ug, Group g where ug.gid=g.gid and uid=<xsp:expr>uid</xsp:expr></esql:query>

results in

      _esql_query.query = String.valueOf(""
                                         + "select * from userGroup ug, Group g where ug.gid=g.gid
and uid="
                                         +
                                         (uid));

So, I'm not sure why this behaves differently. I think the problem is
in xsp.xsl but I can't figure out which template erroneously matches
in the first example....

Help appreciated.


		Chris.

Mime
View raw message