I have another question.
I have the same xml :
<document>
        <pThis is a test</p>
        <table>
                <tr>
                        <td>First TD</td>
                        <td>Second TD</td>
                </tr>
        </table>
        <figure>
                <title>FIGURE 1</title>
                <g>GRAPHIC 1</g>
        </figure>
        <p>Paragraph n° 1 after figure 1</p>
        <p>Paragraph n° 2 after figure 1</p>
        <p>Other Text after figure 3
                 
                        <figure>
                                <title>FIGURE 2</title>
                                <g>GRAPHIC 2</g>
                        </figure>
                        <p>Paragraph n° 1 after figure 2</p>
                 
                <p>Paragraph n° 2 after figure 2</p>
        </p>
        <p>Paragraph n° 3 <u>underline tag</u>after figure 2</p>
        <f>Other TAG</f>
        <p>
                <figure>
                        <title>FIGURE 3</title>
                        <g>GRAPHIC 3</g>
                </figure>Text after figure 3 
                <p>Paragraph into onother Paragraph </p>
        </p>
        <p>Last paragraph</p>
</document>


With the help of J.Pietschmann I succeed to create figure in A3 page and
other tag in A4 page....but now I have the following problem:

I have a repetition of each paragraph ...and this is no correct. Have you
any ideas how can i resolve this problem?
The pdf output it would have to be :
- page A3 only the figure
- page A4  the other tag
- for each tag [i.e. <p><u><f> etc.etc] I wanted to use a specific template

My code is this 
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:fo="http://www.w3.org/1999/XSL/Format";
xmlns:xlink="http://www.w3.org/1999/xlink";>
        <xsl:template match="document">
                <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
                        <fo:layout-master-set>
                                <fo:simple-page-master master-name="pages-A4" 
page-height="11.69in"
page-width="8.27in" margin-top="25pt" margin-bottom="20pt"
margin-left="0.456in" margin-right="1.30in">
                                        <fo:region-body 
region-name="region_body" margin-top="2.3cm"
margin-bottom="4.4cm"/>
                                </fo:simple-page-master>
                                <fo:simple-page-master master-name="pages-A3" 
page-height="11.69in"
page-width="16.54in" margin-top="2cm" margin-bottom="2cm" margin-left="2cm"
margin-right="2cm">
                                        <fo:region-body 
region-name="region_body" margin-top="2.3cm"
margin-bottom="4.4cm"/>
                                </fo:simple-page-master>
                        </fo:layout-master-set>
                        
                        <!-- content before the first figure element, or 
perhaps the only content
-->
                        <fo:page-sequence master-reference="pages-A4">
                                <fo:flow flow-name="region_body">
                                        <fo:block 
text-align="center">BLABLABLABLA</fo:block>
                                        <fo:block font-family="Helvetica" 
font-size="10pt"
text-align="justify">
                                                <xsl:apply-templates 
select="node()[not(preceding-sibling::figure)]"/> 
                                        </fo:block>
                                </fo:flow>
                        </fo:page-sequence>


                      <xsl:for-each select="//figure">
                        <fo:page-sequence master-reference="pages-A3">
                           <fo:flow flow-name="region_body">
                              <fo:block text-align="center">FIGURE</fo:block>
                                     <fo:block font-family="Helvetica" 
font-size="10pt"
text-align="justify">
                                          <xsl:apply-templates select="."/>
                              </fo:block>
                           </fo:flow>
                        </fo:page-sequence>
                        
                        <xsl:variable name="current-figure-node"
select="following::figure[1]"/>
                        <fo:page-sequence master-reference="pages-A4">
                           <fo:flow flow-name="region_body">
                              <fo:block font-family="Helvetica"
font-size="10pt"  text-align="justify">
                                   <xsl:apply-templates
select="following::node()[generate-id(following::figure[1])=generate-id($current-figure-node)]"/>
                            </fo:block> 
                           </fo:flow>
                       </fo:page-sequence>
                    </xsl:for-each>
               </fo:root>
        </xsl:template>



****Template format*****
<xsl:template match="p">
    <fo:block font-family="Helvetica" font-size="10pt" 
text-align="justify">
         <xsl:apply-templates select="node()"/>
    </fo:block>
</xsl:template>

<xsl:template match="u">
    <fo:inline font-family="Helvetica" text-decoration="underline"  >
        <xsl:apply-templates select="node()"/>
    </fo:inline>
</xsl:template>

<xsl:template match="f">
   <fo:block font-family="Helvetica" font-size="10pt"  text-align="justify"
color="red">
         <xsl:apply-templates select="node()"/>
   </fo:block>
</xsl:template>



with best regards,
Fabio
 








fabio76 wrote:
> 
> I have the following file xml :
> 
> <document>
>       <pThis is a test</p>
>       <table>
>               <tr>
>                       <td>First TD</td>
>                       <td>Second TD</td>
>               </tr>
>       </table>
>       <figure>
>               <title>Figure Title</title>
>       </figure>
>       <p>Continue paragraf etc.etc.</p>
> </document>
> 
> Is possible to change the layout of the page when is applied the template
> <xsl:template match="figure"> ?
> I would like to have the page in A3 only for the template 'figure', for
> the other template in A4 format
> Any idea?
> Regards
> Fabio
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-change-layout-page-size-tf2912574.html#a8216354
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to