[xsl] (newbie) problem with parameters in call-template.

Subject: [xsl] (newbie) problem with parameters in call-template.
From: Glen Mazza <glenmazza@xxxxxxxxx>
Date: Mon, 16 Aug 2004 15:19:16 -0700 (PDT)
Hello,

I'm currently using XSLT for FO work, and one of my
templates is not working the way I intended it to.

(To show the problem below, I have truncated the files
as much as possible--so the invalid XSL FO here can be
ignored.)

Here is my XML:

<report/>

Here is my XSL:

<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
	xmlns:fo="http://www.w3.org/1999/XSL/Format";
	version="1.0">

<xsl:template match="report">
   <fo:static-content flow-name="xsl-region-before">
     <xsl:call-template
name="get-xsl-region-before-header">
         <xsl:with-param name="second-line-right"> 
             <fo:block>System Codes
<fo:retrieve-marker retrieve-class-name="code" 
                        retrieve-boundary="page"
retrieve-position="first-starting-within-page"/>
             <fo:block>-</fo:block>
             <fo:retrieve-marker 
                 retrieve-class-name="code" 
                 retrieve-boundary="page" 
                
retrieve-position="last-ending-within-page"/>
            </fo:block>
         </xsl:with-param>
      </xsl:call-template>
  </fo:static-content>
</xsl:template>

<xsl:template name="get-xsl-region-before-header">
    <xsl:param name="second-line-right"/> 
        <fo:block>
           <xsl:value-of select="$second-line-right"/>
        </fo:block>
</xsl:template>

</xsl:stylesheet> 


Here is my resultant document after running the
transformation:

<fo:static-content
xmlns:fo="http://www.w3.org/1999/XSL/Format";
flow-name="xsl-region-before">
   <fo:block>System Codes -</fo:block>
</fo:static-content>

But this is what I wanted it to look like:

<fo:static-content
xmlns:fo="http://www.w3.org/1999/XSL/Format";
flow-name="xsl-region-before">
    <fo:block>System Codes <fo:retrieve-marker
retrieve-class-name="code" 
        retrieve-boundary="page"
retrieve-position="first-starting-within-page"/>
        <fo:block>-</fo:block>
      <fo:retrieve-marker retrieve-class-name="code"
retrieve-boundary="page" 
        retrieve-position="last-ending-within-page"/>
    </fo:block>
</fo:static-content>

I.e., just have it display what is between the
with-params of the upper template.  Any idea what I am
doing wrong?

Thanks,
Glen



	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

Current Thread