cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus Crafter <craft...@fztig938.bank.dresdner.net>
Subject [C2] map:act and sitemap.xsl
Date Fri, 11 May 2001 18:43:11 GMT
Hi All,

	Hope all is well!

	Could someone with a bit more sitemap.xsl knowledge please check the
	following snippet from sitemap.xsl (located where map:act java code is
	generated):

<xsl:choose>
   <xsl:when test="./*[namespace-uri()='http://apache.org/cocoon/sitemap/1.0']">
        if ((map = <xsl:value-of select="$action-name"/> (environment, objectModel,
substitute(listOfMaps,<xsl:value-of select="$action-source"/>), <xsl:value-of select="$component-param"/>))
!= null) {
         getLogger().debug("Action <xsl:value-of select="translate($action-name,'&quot;','
')"/>");
          listOfMaps.add (map);
          <xsl:apply-templates/>
          listOfMaps.remove(listOfMaps.size()-1);
        }
   </xsl:when>
   <xsl:otherwise>
        map = <xsl:value-of select="$action-name"/> (environment, objectModel, substitute(listOfMaps,<xsl:value-of
select="$action-source"/>), <xsl:value-of select="$component-param"/>);
   </xsl:otherwise>
</xsl:choose>

	Is the namespace xsl:when test above actually correct ?
	
	My sitemap (and the c2 webapp) specifies the namespace
	xmlns:map="http://apache.org/cocoon/sitemap/1.0" (at <map:sitemap ... >)
	however for some reason the 'otherwise' case of the xsl:when always
	seems to be invoked.

	This causes problems because listOfMaps.add(map) is not added to the
	generated java code in the 'otherwise' case, preventing actions from
	being able to add/modify variables for later use (the Map object
	returned from an action is simply dropped).

	Is the namespace test correct ? or should listOfMaps.add(map) be added
	to the 'otherwise' case, or have I totally misuderstood what's going
	on here! :-)

	Cheers,

	Marcus


-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   Open Software Associates GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'     Email : Marcus.Crafter@osa.de
          &&&&.        Business Hours : +49 69 9757 200
    &&&&&&&:           After Hours    : +49 69 49086750


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


Mime
View raw message