> -----Original Message-----
> From: Dave Pawson [mailto:[email protected]]
> Sent: Saturday, April 17, 2010 10:13 AM
> To: [email protected]
> Subject: Re: [docbook-apps] dynamic chunk.section.depth
> 
> On Sat, 17 Apr 2010 09:02:23 -0400
> Tim Arnold <[email protected]> wrote:
> 
> > Hi Dave, by 'dense' I just mean a subsection has a lot of math (so it
> > contains lots of graphics) and the section is long (so you have to
> > scroll). Not that it has a lot of deeply nested sub-sub-etc-sections.
> > Your answer makes me think the chunk.section.depth  parameter can be
> > set differently depending on the situation. My current process puts a
> > <remark role="toc2" /> or <remark role="toc3"/> under every
> > subsection as a flag showing how deep the chunks should go for that
> > subsection. It's a kludge I guess, but I haven't figured out anything
> > better yet.
> >
> > Are you saying I could write a template to match on
> > rema...@role="toc2"]  or rema...@role="toc3"] to change the
> > chunk.section.depth during processing? That's exactly what I'd like
> > to do, but I didn't think it could be done.
> 
> Other way round.
> In your specialization layer, set a variable to 'measure' whatever
> you want, then set the parameter from that?
> 
> <xsl:variable name ='density'>
> <xsl:choose>
> 
> 
> </
> 
> <xsl:param name='chunk.section.depth' select='$density'/>
> 
> 
> I'm not sure if you can replace variable with param, worth
> a try though.
> 
> HTH
> 
> 
> --
> 
> regards
> 
> --
> Dave Pawson
> XSLT XSL-FO FAQ.
> http://www.dpawson.co.uk
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

First I tried it by hardcoding (no $density variable) and confirmed that it 
does not work. It appears that the stylesheets don't pay any attention to 
changes in the parameter during processing. The following code produces "Depth 
is 3" or "Depth is 2" as it processes the document, but the chunked output 
always shows the same depth that was set at the beginning of the run.

It was worth a try, but I think this probably beyond my xslt skills. 

thanks,
--Tim
 

<xsl:template 
match="d:chapter/d:section/d:section//d:para/d:rema...@role='toc2']" 
priority="1">
  <xsl:param name='chunk.section.depth' select="2"/>
  <xsl:message><xsl:text>Depth is </xsl:text><xsl:value-of 
select="$chunk.section.depth"/></xsl:message>
</xsl:template>
<xsl:template 
match="d:chapter/d:section/d:section/d:para/d:rema...@role='toc3']" 
priority="1">
  <xsl:param name='chunk.section.depth' select="3"/>
  <xsl:message><xsl:text>Depth is </xsl:text><xsl:value-of 
select="$chunk.section.depth"/></xsl:message>
</xsl:template>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to