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

xsl:with-param

Subject: xsl:with-param
From: Corneanu Dan <cdan@xxxxxxxxxxx>
Date: Thu, 14 Mar 2002 11:15:46 +0200
xsl params
Hi,
i have the following XML excerpt:

<address>
   <street>Drubeta 10</street>
   <city>Timisoara</city>
   <country>Romania</country>
</address>

This is transformed (must go into a table-row) using something like this:

<xsl:template name="addRow">
   <xsl:param name="firstCell"/>
   <xsl:param name="secondCell"/>
   <fo:table-row font-size="12pt" line-height="14pt">
       <fo:table-cell>
           <fo:block><xsl:value-of select="$firstCell"/></fo:block>
       </fo:table-cell>
       <fo:table-cell>
           <fo:block><xsl:value-of select="$secondCell"/></fo:block>
       </fo:table-cell>
   <fo:table-row>
</xsl:template>

Now, the problem comes when I whant to call this template wit a param value
containing othe <fo:...> elements inside. All it's OK if I call the template using string values
for the input params.



<xsl:template match="address">
<xsl:call-template name="addRow">
<xsl:with-param name="firstCell">Address</xsl:param> <!-- This is OK -->
<xsl:with-param name="secondCell"> <!-- THIS IS NOT WHAT I WHANT -->
<fo:block font-size="5pt"><xsl:value-of select="street"/></fo:block>
<fo:block font-size="5pt"><xsl:value-of select="city"/></fo:block>
<fo:block font-size="5pt"><xsl:value-of select="country"/></fo:block> </xsl:param>
</xsl:call-template>
</xsl:template>


Can you give me some help on calling a template with a tree-fragment as a parameter?

Thanks and Best Regards,

Dan Corneanu.


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.