List Info

Thread: How to get total number of pages in the footer?




How to get total number of pages in the footer?
user name
2006-02-18 20:44:58
Great! Thanks Bob.

I'll give that a try ... I have one more question
though.
How can I get output like this ...

                            page 2 of 10
                           END OF PAGE

... would guess I would do something like this ...

<fo:block>
   <xsl:text>page
</xsl:test><fo:page-number/> of
<fo:??????>
</fo:block>
<fo:block>
<xsl:text>END OF PAGE</xsl:text>
</fo:block>

... but I do not know what contains the value of the
total number of pages.

--- Bob Stayton <bobssagehill.net> wrote:

> Hi Sheldon,
> Both pieces of text are in the same fo:block, which
> means the typesetter
> fills out lines with them, in this case only one
> line.  So put them each in
> their own block:
> 
> <fo:block>
>    <fo:page-number/>
> </fo:block>
> <fo:block>
>    <xsl:text>END OF PAGE</xsl:text>
> </fo:block>
> 
> Bob Stayton
> Sagehill Enterprises
> DocBook Consulting
> bobssagehill.net
> 
> 
> ----- Original Message ----- 
> From: "Sheldon Plankton"
<sheldonplanktonyahoo.com>
> To: <docbook-appslists.oasis-open.org>
> Sent: Thursday, February 16, 2006 10:14 AM
> Subject: [docbook-apps] How to get a Multilined
> footer?
> 
> 
> > Hi,
> >
> >   Sorry "cross posting" I mistakenly
posted this
> to the docbook mailing
> list and not the
> >   docbook-app mailing list.  I will spank myself
> for this error!
> >
> >   I have in my customization xsl file for
> generating PDFs these lines
> > ...
> >
> >   <?xml version='1.0'?>
> >   <xsl:stylesheet
> >     
> xmlnssl=&
quot;http://www.w3.or
g/1999/XSL/Transform"
> >      xmlns:fo="http://www.w3.org/1
999/XSL/Format"
> >       version="1.0">
> >
> >   <xsl:template
>
name="initial.page.number">auto-odd</xsl:t
emplate>
> >   <xsl:template
>
name="page.number.format">1</xsl:template&
gt;
> >
> >   <xsl:template
name="footer.content">
> >      <xsl:param name="pageclass"
select ="''" />
> >      <xsl:param name="sequence"
select ="''" />
> >      <xsl:param name="position"
select ="''" />
> >      <xsl:param name="gentext-key"
select ="''" />
> >
> >      <xsl:choose>
> >          <xsl:when
test="$postion='center'" >
> >          <fo:page-number/>
> >          <xsl:text>END OF
PAGE</xsl:text>
> >          </xsl:when>
> >          <xsl:otherwise>
> >           <!-- no output -->
> >          <xsl:otherwise/>
> >   </xsl:choose>
> >
> >   ... which gives me footers that look something
> like this ...
> >
> >
> >                                        1END OF
> PAGE
> >
> >
> >   ... when I want ...
> >
> >                                                  1
> >                                         END OF
> PAGE
> >
> >   ... what do I need to chane?
> >
> >   Thanks
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection
around 
http://mail.yahoo.com 

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org

How to get total number of pages in the footer?
user name
2006-02-20 17:01:51
> -----Original Message-----
> From: Sheldon Plankton 
> 
> How can I get output like this ...
> 
>                             page 2 of 10
>                            END OF PAGE
> 
> ... would guess I would do something like this ...
> 
> <fo:block>
>    <xsl:text>page
</xsl:test><fo:page-number/> of
> <fo:??????>
> </fo:block>
> <fo:block>
> <xsl:text>END OF PAGE</xsl:text>
> </fo:block>
> 
> ... but I do not know what contains the value of the
> total number of pages.


See these posts:
http://lists.oasis-open.org/archives/docbo
ok-apps/200507/msg00138.html
http://lists.oasis-open.org/archives/docbo
ok-apps/200509/msg00187.html

/MJ



------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org

How to get total number of pages in the footer?
user name
2006-02-21 07:14:32
Thanks Mauritz

msg00187.html was what I was looking for. Thanks!

--- Mauritz Jeanson <mjjohanneberg.com> wrote:

> > -----Original Message-----
> > From: Sheldon Plankton 
> > 
> > How can I get output like this ...
> > 
> >                             page 2 of 10
> >                            END OF PAGE
> > 
> > ... would guess I would do something like this ...
> > 
> > <fo:block>
> >    <xsl:text>page
</xsl:test><fo:page-number/> of
> > <fo:??????>
> > </fo:block>
> > <fo:block>
> > <xsl:text>END OF PAGE</xsl:text>
> > </fo:block>
> > 
> > ... but I do not know what contains the value of
> the
> > total number of pages.
> 
> 
> See these posts:
>
http://lists.oasis-open.org/archives/docbo
ok-apps/200507/msg00138.html
>
http://lists.oasis-open.org/archives/docbo
ok-apps/200509/msg00187.html
> 
> /MJ
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection
around 
http://mail.yahoo.com 

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org

Adding attributes/parameters to the "<para>" template?
user name
2006-02-22 20:09:07
Hi,
 ;
I am having a hard time trying add a "para template"&nbsp;in my "customization" layer.
I would want to add an parameter to the para template.&nbsp; This parameter would
contain a string that would be prepended to the paragraph.
 ;
So if I had in my xml file this ...
 ;
<para pm="+++ ">Hi there </para&gt;
 ;
... output would be in html something like ...
 ;
<p&gt;+++ Hi there</p>
 ;
Also how would I make the template use a default value if the attribute/parameter
was left out?  Also how could I make another template say ... strict_para ... that
would cause an error if the parameter was left out?
 ;
I guess I should get a book on xsl ... right?&nbsp; or is xstl?
 ;
Thanks
Plankton
 ;
 ;



What are the most popular cars? Find out at Yahoo! Autos
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )