Subject: [xsl] Re: Re: Bug in treating an RTF by Saxon 6.5 and MSXML From: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Date: Thu, 16 May 2002 01:21:12 -0700 (PDT) |
"Michael Leditschke" <mike at ammd dot com dot au> wrote: > If the select attribute is used on a xsl:param, isn't the value of > the parameter the result of the XPath expression, in which case its > a boolean, a number, a string, or a nodeset? Its only an RTF is you > include a template in the body of the xsl:param elements. So the > correctness or otherwise of the later operations depends on what > XPath expression you use. Exactly. In the example provided, the template that receives the RTF as the value of its $arg1 parameter is: <xsl:template match="str-split2words-func:*"> <xsl:param name="arg1" select="/.."/> <xsl:param name="arg2"/> ......................Some nodes are copied here to the result tree </xsl:template> It is instantiated in the (provided) stylesheet str-foldl.xsl in the following way: <xsl:variable name="vFunResult"> <xsl:apply-templates select="$pFunc[1]"> <xsl:with-param name="arg0" select="$pFunc[position() > 1]"/> <xsl:with-param name="arg1" select="$pA0"/> <xsl:with-param name="arg2" select="substring($pStr,1,1)"/> </xsl:apply-templates> </xsl:variable> <xsl:call-template name="str-foldl"> <xsl:with-param name="pFunc" select="$pFunc"/> <xsl:with-param name="pStr" select="substring($pStr,2)"/> <xsl:with-param name="pA0" select="$vFunResult"/> </xsl:call-template> First a new temporary result is accumulated in $vFunResult. This is an RTF, which has been produced by applying the first template above. So in the xsl:call-template, the str-foldl template calls itself recursively, passing this RTF as the value of the pA0 parameter, which then is passed as the value of the $arg1 parameter, when the variable $vFunResult is calculated again. So, $arg1 contains an RTF. Cheers, Dimitre Novatchev. __________________________________________________ Do You Yahoo!? LAUNCH - Your Yahoo! Music Experience http://launch.yahoo.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: RE: Bug in treating an RT, Dimitre Novatchev | Thread | [xsl] MSXML4 only crashes (Was: Re:, Dimitre Novatchev |
[xsl] Re: RE: Bug in treating an RT, Dimitre Novatchev | Date | Re: [xsl] Converting a string to sm, Brook Elgie |
Month |