Mixed page sizes in a section

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Mixed page sizes in a section

scopley
I'm looking for a way to style a section with different page sizes throughout. Through the use of an attribute I'm able to switch between different pagemasters and get the sizing that I want however when it switches back to the 8.5x11 it resets page number back to one.

I know that it is because I have my initial page number set to 1 on my chapter template so when it goes back to that page set it resets it to 1. Is there a way to make the initial page number attribute conditional or is there a better way to switch page sizes within a section?

Any help would be greatly appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: Mixed page sizes in a section

Tony Graham-3
On Wed, Apr 21 2010 12:47:51 +0100, [hidden email] wrote:
> I'm looking for a way to style a section with different page sizes
> throughout. Through the use of an attribute I'm able to switch between
> different pagemasters and get the sizing that I want however when it
> switches back to the 8.5x11 it resets page number back to one.
>
> I know that it is because I have my initial page number set to 1 on my
> chapter template so when it goes back to that page set it resets it to 1. Is
> there a way to make the initial page number attribute conditional or is
> there a better way to switch page sizes within a section?

It might help us help you if you showed a little of what your XSLT is
doing.

Regards,


Tony Graham                         [hidden email]
Director                                  W3C XSL FO SG Invited Expert
Menteith Consulting Ltd                               XML Guild member
XML, XSL and XSLT consulting, programming and training
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
Registered in Ireland - No. 428599   http://www.menteithconsulting.com
  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
xmlroff XSL Formatter                               http://xmlroff.org
xslide Emacs mode                  http://www.menteith.com/wiki/xslide
Unicode: A Primer                               urn:isbn:0-7645-4625-2

Reply | Threaded
Open this post in threaded view
|

Re: Mixed page sizes in a section

scopley
Here is a snippet of the XML File:

<mmchapter chapnbr="4" id="ch04" revdate="00/00/00">
<mmfigure id="fig100">
<mmsheet foldout="1">
<mmeffect>ALL</mmeffect>
<mmgraphic chg="u" gnbr="c130h7930007a"/>
</mmsheet>
</mmfigure>
</mmchapter>

Here is a snippet of my Chapter template:

<xsl:template match="imm:mmchapter">
<fo:page-sequence master-reference="master" initial-page-number="1">
<fo:flow flow-name="body">
<fo:block xsl:use-attribute-sets="headfoot top" text-align="center" font-size="14pt" space-after="10pt" padding-top="20pt" break-before="odd-page" id="{@id}">CHAPTER
<xsl:value-of select="@chapnbr"/>
</fo:block>
<fo:block xsl:use-attribute-sets="headfoot bottom" text-align="center" font-size="14pt" space-after="25pt" padding-bottom="20pt">
<xsl:value-of select="imm:mmtitle"/>
</fo:block>
<xsl:apply-templates/>
<fo:block id="{generate-id(.)}"/>
</fo:flow>
</fo:page-sequence>
</xsl:template>

Here is a snippet of my figure template:

<xsl:template match="imm:mmfigure">
<xsl:variable name="total" select="@shttotal"/>
<xsl:choose>
<xsl:when test="imm:mmsheet/@foldout='1'">
<fo:page-sequence master-reference="11x17" initial-page-number="auto-odd">
<fo:flow flow-name="body11x17">
<fo:block-container id="{@id}" xsl:use-attribute-sets="figsp" keep-together="always" span="all">
<xsl:apply-templates/>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
</xsl:when>
Tony Graham-3 wrote
On Wed, Apr 21 2010 12:47:51 +0100, Sarah.R.Copley@uscg.mil wrote:
> I'm looking for a way to style a section with different page sizes
> throughout. Through the use of an attribute I'm able to switch between
> different pagemasters and get the sizing that I want however when it
> switches back to the 8.5x11 it resets page number back to one.
>
> I know that it is because I have my initial page number set to 1 on my
> chapter template so when it goes back to that page set it resets it to 1. Is
> there a way to make the initial page number attribute conditional or is
> there a better way to switch page sizes within a section?

It might help us help you if you showed a little of what your XSLT is
doing.

Regards,


Tony Graham                         Tony.Graham@MenteithConsulting.com
Director                                  W3C XSL FO SG Invited Expert
Menteith Consulting Ltd                               XML Guild member
XML, XSL and XSLT consulting, programming and training
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
Registered in Ireland - No. 428599   http://www.menteithconsulting.com
  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
xmlroff XSL Formatter                               http://xmlroff.org
xslide Emacs mode                  http://www.menteith.com/wiki/xslide
Unicode: A Primer                               urn:isbn:0-7645-4625-2
Reply | Threaded
Open this post in threaded view
|

Re: Mixed page sizes in a section

Tony Graham-3
On Tue, April 27, 2010 11:59 am, scopley wrote:

> Here is a snippet of the XML File:
>
> <mmchapter chapnbr="4" id="ch04" revdate="00/00/00">
> <mmfigure id="fig100">
> <mmsheet foldout="1">
> <mmeffect>ALL</mmeffect>
> <mmgraphic chg="u" gnbr="c130h7930007a"/>
> </mmsheet>
> </mmfigure>
> </mmchapter>
>
> Here is a snippet of my Chapter template:
>
> <xsl:template match="imm:mmchapter">
> <fo:page-sequence master-reference="master" initial-page-number="1">

You could do:

<xsl:if test="not(preceding-sibling::imm:mmchapter)">
  <xsl:attribute name="initial-page-number">1</xsl:attribute>
</xsl:if>

so you only set it on the first chapter.

> <fo:flow flow-name="body">
> <fo:block xsl:use-attribute-sets="headfoot top" text-align="center"
> font-size="14pt" space-after="10pt" padding-top="20pt"
> break-before="odd-page" id="{@id}">CHAPTER
> <xsl:value-of select="@chapnbr"/>
> </fo:block>
> <fo:block xsl:use-attribute-sets="headfoot bottom" text-align="center"
> font-size="14pt" space-after="25pt" padding-bottom="20pt">
> <xsl:value-of select="imm:mmtitle"/>
> </fo:block>
> <xsl:apply-templates/>
> <fo:block id="{generate-id(.)}"/>
> </fo:flow>
> </fo:page-sequence>
> </xsl:template>
>
> Here is a snippet of my figure template:
>
> <xsl:template match="imm:mmfigure">
> <xsl:variable name="total" select="@shttotal"/>
> <xsl:choose>
> <xsl:when test="imm:mmsheet/@foldout='1'">
> <fo:page-sequence master-reference="11x17" initial-page-number="auto-odd">
> <fo:flow flow-name="body11x17">
> <fo:block-container id="{@id}" xsl:use-attribute-sets="figsp"
> keep-together="always" span="all">
> <xsl:apply-templates/>
> </fo:block-container>
> </fo:flow>
> </fo:page-sequence>
> </xsl:when>

You appear to be putting fo:page-sequence inside fo:flow, which I'm
surprised works at all for you.

Regards,


Tony Graham                         [hidden email]
Director                                  W3C XSL FO SG Invited Expert
Menteith Consulting Ltd                               XML Guild member
XML, XSL and XSLT consulting, programming and training
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
Registered in Ireland - No. 428599   http://www.menteithconsulting.com
  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
xmlroff XSL Formatter                               http://xmlroff.org
xslide Emacs mode                  http://www.menteith.com/wiki/xslide
Unicode: A Primer                               urn:isbn:0-7645-4625-2


Reply | Threaded
Open this post in threaded view
|

Re: Mixed page sizes in a section

scopley
It does work but if there is a better way to switch page sizes within my chapter I would love to change it. Thanks for your response.
Tony Graham-3 wrote
On Tue, April 27, 2010 11:59 am, scopley wrote:
> Here is a snippet of the XML File:
>
> <mmchapter chapnbr="4" id="ch04" revdate="00/00/00">
> <mmfigure id="fig100">
> <mmsheet foldout="1">
> <mmeffect>ALL</mmeffect>
> <mmgraphic chg="u" gnbr="c130h7930007a"/>
> </mmsheet>
> </mmfigure>
> </mmchapter>
>
> Here is a snippet of my Chapter template:
>
> <xsl:template match="imm:mmchapter">
> <fo:page-sequence master-reference="master" initial-page-number="1">

You could do:

<xsl:if test="not(preceding-sibling::imm:mmchapter)">
  <xsl:attribute name="initial-page-number">1</xsl:attribute>
</xsl:if>

so you only set it on the first chapter.

> <fo:flow flow-name="body">
> <fo:block xsl:use-attribute-sets="headfoot top" text-align="center"
> font-size="14pt" space-after="10pt" padding-top="20pt"
> break-before="odd-page" id="{@id}">CHAPTER
> <xsl:value-of select="@chapnbr"/>
> </fo:block>
> <fo:block xsl:use-attribute-sets="headfoot bottom" text-align="center"
> font-size="14pt" space-after="25pt" padding-bottom="20pt">
> <xsl:value-of select="imm:mmtitle"/>
> </fo:block>
> <xsl:apply-templates/>
> <fo:block id="{generate-id(.)}"/>
> </fo:flow>
> </fo:page-sequence>
> </xsl:template>
>
> Here is a snippet of my figure template:
>
> <xsl:template match="imm:mmfigure">
> <xsl:variable name="total" select="@shttotal"/>
> <xsl:choose>
> <xsl:when test="imm:mmsheet/@foldout='1'">
> <fo:page-sequence master-reference="11x17" initial-page-number="auto-odd">
> <fo:flow flow-name="body11x17">
> <fo:block-container id="{@id}" xsl:use-attribute-sets="figsp"
> keep-together="always" span="all">
> <xsl:apply-templates/>
> </fo:block-container>
> </fo:flow>
> </fo:page-sequence>
> </xsl:when>

You appear to be putting fo:page-sequence inside fo:flow, which I'm
surprised works at all for you.

Regards,


Tony Graham                         Tony.Graham@MenteithConsulting.com
Director                                  W3C XSL FO SG Invited Expert
Menteith Consulting Ltd                               XML Guild member
XML, XSL and XSLT consulting, programming and training
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
Registered in Ireland - No. 428599   http://www.menteithconsulting.com
  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
xmlroff XSL Formatter                               http://xmlroff.org
xslide Emacs mode                  http://www.menteith.com/wiki/xslide
Unicode: A Primer                               urn:isbn:0-7645-4625-2

Reply | Threaded
Open this post in threaded view
|

reference-orientation

Szabo, Patrick (LNG-VIE)
Hi,

I'm using XSL 1.0 and XEP...
 
I've got a table that is a few pages long and I want to rotate it using
"reference-orientation".
I just wrapped the table with a <fo:block-container
reference-orientation="-90"></..>
 
The table is really rotated 90 deg but only the part of the table that
is on the first page - the rest is missing.
 
Any idea how to solve that ?!
 
best regards


Patrick Szabo
 XSLT-Entwickler

Tel.: +43 (1) 534 52 - 1573
Fax: +43 (1) 534 52 - 146

[hidden email]

LexisNexis Verlag ARD Orac GmbH & Co KG
Marxergasse 25, 1030 Wien
FN 8333f, Handelsgericht Wien
http://www.lexisnexis.at/