xsl-list
[Top] [All Lists]

[xsl] [FXSL] Using document('') to get the high-level function (+ a little bug?)

2006-06-24 04:04:12
  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 réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son 
interface révolutionnaire.
http://fr.mail.yahoo.com

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--