[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: Bug in treating an RTF by Saxon 6.5 and MSXML

Subject: 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)
 Re: Re:  Bug in treating an RTF by Saxon 6.5 and MSXML
"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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.