Subject: [xsl] [FXSL] Using document('') to get the high-level function (+ a little bug?) From: Florent Georges <darkman_spam@xxxxxxxx> Date: Sat, 24 Jun 2006 13:03:45 +0200 (CEST) |
Hi There is no mailing list on the SF.net project page for FXSL, but I think my question is on topic here (Dimitre, could you please let me know if there is a more appropriate place to discuss FXSL?). I noted that FXSL for XSLT 2.0 still uses in its test scripts the following construct to pass the high-level function to the FXSL templates: <myAdd:myAdd/> <xsl:template match="/"> <xsl:variable name="vFun" select="document('')/*/myAdd:*[1]"/> <xsl:call-template name="zipWith"> <xsl:with-param name="pFun" select="$vFun"/> ... So it requires to access to the XML rpresentation of the script. Is there any reason (other than historical) to not use something like the following, which IMHO seems more appropriate (at least in large scripts)? <xsl:template match="/"> <xsl:variable name="vFun" as="element()"> <myAdd:myAdd/> </xsl:variable> <xsl:call-template name="zipWith"> <xsl:with-param name="pFun" select="$vFun"/> ... BTW, the zipWith template call itself recursively, passing the literal default value 'el' for the pElName parameter, instead of the actual value of this parameter, $pElName. I guess it is a bug? <xsl:call-template name="zipWith"> ... <xsl:with-param name="pElName" select="'el' (: not $pElName ? :)"/> </xsl:call-template> Regards, --drkm ___________________________________________________________________________ Yahoo! Mail riinvente le mail ! Dicouvrez le nouveau Yahoo! Mail et son interface rivolutionnaire. http://fr.mail.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] returning nodes (not a st, David Carlisle | Thread | Re: [xsl] [FXSL] Using document(''), Colin Paul Adams |
Re: [xsl] XSLT arguments in PHP 5, Jirka Kosek | Date | [xsl] How count the Table cell (Cal, Byomkesh |
Month |