This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

xsl:with-param


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]