[xsl] Re: xsl:with-param issue.

Subject: [xsl] Re: xsl:with-param issue.
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Sun, 24 Dec 2000 22:27:25 -0800 (PST)
Dave,

The reason why <fo:page-number/> is not copied to the output is because
you're using:

<xsl:value-of select="$head-R"/> 

Must be:

<xsl:copy-of select="$head-R"/>

I guess the same applies to <xsl:value-of select="$head-L"/> a few
lines before this one.


Best wishes for the holidays,

Dimitre Novatchev. 



Dave Pawson wrote:

Suffering with disappearing parameters.

<xsl:call-template name="page-sequence">
   <xsl:with-param name="head-L">An XSL Primer</xsl:with-param>
   <xsl:with-param name="head-R">Page
<fo:page-number/></xsl:with-param>
   <xsl:with-param name="foot-L">XSL Primer</xsl:with-param>
   <xsl:with-param name="foot-R">Page
<fo:page-number/></xsl:with-param>
</xsl:call-template>

Then in the named template.

  <xsl:template name="page-sequence">
     <xsl:param name="region-head">before</xsl:param><!-- region name
for header -->
     <xsl:param name="region-foot">after</xsl:param><!-- region name
for footer -->
     <xsl:param name="head-L"> </xsl:param>
     <xsl:param name="head-R"><fo:page-number/></xsl:param>
     <xsl:param name="foot-L"> </xsl:param>
     <xsl:param name="foot-R"><fo:page-number/></xsl:param>

<!-- header section  -->
    <fo:static-content 
	 flow-name="{concat('xsl-region-',$region-head)}">          
        <xsl:comment>2B</xsl:comment>
	 <fo:list-block  
	   font-family="Helvetica" 
	   font-size="10pt" 
	   provisional-distance-between-starts="5in" 
	   provisional-label-separation="0in">
	   <fo:list-item>
	     <fo:list-item-label>
	       <fo:block 
		 text-align="start"><xsl:value-of select="$head-L"/><!-- Header Left
value -->
	       </fo:block>
    </fo:list-item-label>
	     <fo:list-item-body>
	       <fo:block
                  text-align="end"><xsl:value-of select="$head-R"/>
</fo:block><!-- Header Right -->
	       </fo:list-item-body>
	     </fo:list-item>    
	   </fo:list-block>
	 </fo:static-content>
etc.

When I run this through saxon, the output for $head-R is
simply 'Page ' with no <fo:page-number/> 

I couldn't find anything about *not* having other namespaced stuff in
the rec.
Anyone know if/why its wrong please?

Regards DaveP





__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread