hi,
your xsl is wrong..
if iDocSys is the root element try using <xsl:for-each 
select="iDocSys/PortfolioList/Portfolio">
and in the fo:flow element use a simple <xsl:apply-template />

You can refer the following link on xsl transformation...
http://www.ibiblio.org/xml/books/bible2/chapters/ch17.html
cheers
narinder

--- andrew mercer <[EMAIL PROTECTED]> wrote:
> Thanks,
> 
> Tried that but now get the following error when trying to convert the 
> .fo file to a .pdf file using org.apache.fop.apps.Fop:
> 
> fo:flow must contain block level children.
> 
> I have attached my .xsl file (as it is not too long) and left the 
> suggested <xsl:for-each...> in See line 33.
> 
> Any other ideas, or is my xsl wrong!!.
> 
> Thanks Andrew
> 
> XSL FILE:
> 
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
>    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>    xmlns:fo="http://www.w3.org/1999/XSL/Format";>
> 
>    <xsl:output method="xml"/>
> 
>    <xsl:template match="/">
>      <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
>        <fo:layout-master-set>
>          <fo:simple-page-master margin-right="25pt" margin-left="25pt"
>            page-height="8.0in" page-width="11in"
>            margin-bottom="15pt" margin-top="15pt" master-name="odd">
>            <fo:region-before extent="25pt"/>
>            <fo:region-body margin-top="30pt" margin-bottom="30pt"/>
>            <fo:region-after extent="25pt"/>
>          </fo:simple-page-master>
>          <fo:simple-page-master margin-right="25pt" margin-left="25pt"
>            page-height="8.0in" page-width="11in"
>            margin-bottom="15pt" margin-top="15pt" master-name="even">
>            <fo:region-before extent="25pt"/>
>            <fo:region-body margin-top="30pt" margin-bottom="30pt"/>
>            <fo:region-after extent="25pt"/>
>          </fo:simple-page-master>
> 
>          <fo:page-sequence-master master-reference="odd">
>            <fo:repeatable-page-master-alternatives>
>              <fo:conditional-page-master-reference 
> master-reference="even" odd-or-even="even"/>
>            </fo:repeatable-page-master-alternatives>
>          </fo:page-sequence-master>
>        </fo:layout-master-set>
> 
>        <xsl:for-each select="/iDocSys/PortfolioList/Portfolio">
>          <fo:page-sequence master-reference="even" 
> initial-page-number="1"> <!-- need to alter the page number -->
> 
> <!--        <fo:static-content flow-name="xsl-region-before">
>              <fo:block text-align="end"
>                font-size="8pt"
>                font-family="serif"
>                line-height="10pt">Page <fo:page-number/>
>              </fo:block>
>            </fo:static-content> -->
> 
>            <fo:flow flow-name="xsl-region-body">
>              <xsl:apply-templates select="iDocSys"/>
>            </fo:flow>
> 
>          </fo:page-sequence>
>        </xsl:for-each>
>      </fo:root>
>    </xsl:template>
> 
>    <xsl:template match="iDocSys">
>      <xsl:apply-templates select="PortfolioList"/>
>    </xsl:template>
> 
>    <xsl:template match="PortfolioList">
>      <xsl:for-each select="Portfolio">
>        <fo:block line-height="24pt" font-size="8pt" text-align="left" 
> break-after="page">
>          <fo:table table-layout="fixed" width="270mm">
>            <fo:table-column column-width="10mm"/>
>            <fo:table-column column-width="35mm"/>
>            <fo:table-column column-width="10mm"/>
>            <fo:table-column column-width="90mm"/>
>            <fo:table-column column-width="35mm"/>
>            <fo:table-column column-width="35mm"/>
>            <fo:table-column column-width="30mm"/>
>            <fo:table-column column-width="25mm"/>
> 
>            <fo:table-header>
>              <fo:table-row keep-together="always">
>                <fo:table-cell>
>                </fo:table-cell>
>                <fo:table-cell>
>                  <fo:block line-height="18pt" vertical-align="top">
>                    <xsl:text>Portfolio No</xsl:text>
>                  </fo:block>
>                </fo:table-cell>
>                <fo:table-cell>
>                  <fo:block line-height="18pt" font-weight="bold" 
> vertical-align="top">
>                    <xsl:value-of select="PortfolioName"/>
>                  </fo:block>
>                </fo:table-cell>
>                <fo:table-cell number-columns-spanned="2">
>                  <fo:block line-height="18pt" font-weight="bold" 
> vertical-align="top">
>                    <xsl:value-of select="PortfolioTown"/>
>                    <xsl:text>      </xsl:text>
>                    <xsl:value-of select="PortfolioAddress"/>
>                  </fo:block>
>                </fo:table-cell>
>                <fo:table-cell>
>                </fo:table-cell>
>                <fo:table-cell>
>                  <fo:block line-height="18pt" vertical-align="top">
>                    <xsl:value-of select="CreationDate"/>
>                  </fo:block>
>                </fo:table-cell>
>                <fo:table-cell>
>                  <fo:block text-align="end" vertical-align="top"
>                    font-size="8pt"
>                    font-family="serif"
>                    line-height="10pt">Page <fo:page-number/>
>                  </fo:block>
>                </fo:table-cell>
>              </fo:table-row>
> 
>              <fo:table-row>
>                <fo:table-cell>
>                  <fo:block line-height="14pt" font-weight="bold" 
> text-align="left" vertical-align="middle"
>                    border-width="1pt" border-color="black">
>                    File
>                  </fo:block>
>                </fo:table-cell>
>                <fo:table-cell>
>                  <fo:block line-height="14pt" font-weight="bold" 
> text-align="left" vertical-align="middle"
>                    border-width="1pt" border-color="black">
>                    Drg No
>                  </fo:block>
>                </fo:table-cell>
>                <fo:table-cell>
>                  <fo:block line-height="14pt" font-weight="bold" 
> text-align="left" vertical-align="middle"
>                    border-width="1pt" border-color="black">
>                    Rev
>                  </fo:block>
>                </fo:table-cell>
>                <fo:table-cell>
>                  <fo:block line-height="14pt" font-weight="bold" 
> text-align="left" vertical-align="middle"
>                    border-width="1pt" border-color="black">
>                    Title
>                  </fo:block>
>                </fo:table-cell>
>                <fo:table-cell>
>                  <fo:block line-height="14pt" font-weight="bold" 
> text-align="left" vertical-align="middle"
>                    border-width="1pt" border-color="black">
>                    Type
>                  </fo:block>
>                </fo:table-cell>
>                <fo:table-cell>
>                  <fo:block line-height="14pt" font-weight="bold" 
> text-align="left" vertical-align="middle"
>                    border-width="1pt" border-color="black">
>                    Status
>                  </fo:block>
>                </fo:table-cell>
>                <fo:table-cell>
>                  <fo:block line-height="14pt" font-weight="bold" 
> text-align="left" vertical-align="middle"
>                    border-width="1pt" border-color="black">
>                    Unit
>                  </fo:block>
>                </fo:table-cell>
>                <fo:table-cell>
>                  <fo:block line-height="14pt" font-weight="bold" 
> text-align="left" vertical-align="middle"
>                    border-width="1pt" border-color="black">
>                    Floor
>                  </fo:block>
>                </fo:table-cell>
>              </fo:table-row>
>            </fo:table-header>
> 
>            <fo:table-body font-size="8pt" font-family="sans-serif">
>              <xsl:for-each select="DisciplineList">
>                <xsl:for-each select="Discipline">
>                  <xsl:for-each select="SourceList">
>                    <xsl:for-each select="Source">
>                      <fo:table-row keep-together="always">
>                      <fo:table-cell>
>                      </fo:table-cell>
>                      <fo:table-cell>
>                      </fo:table-cell>
>                      <fo:table-cell>
>                      </fo:table-cell>
>                      <fo:table-cell>
>                        <fo:block font-weight="bold" 
> 
=== message truncated ===


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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

Reply via email to