xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessandro Marcellini <amarc...@tiscalinet.it>
Subject Re: Fw: Split a table in many tables
Date Thu, 22 Mar 2001 07:58:03 GMT
I got the solution from M. Kay:
<xsl:template match="child[position() mod 5 = 1]">
  <parent>
  <xsl:copy-of select=". | following-sibling::child[position() &lt; 5]"/>
  </parent>
</xsl:template>

<xsl:template match="child"/>

to split this:
<root>
  <child>ch</child>
  <child>ch</child>
  <child>ch</child>
  <child>ch</child>
  <child>ch</child>
  <child>ch</child>
  <child>ch</child>
</root>
In this:
<root>
  <parent>
  <child>ch</child>
  <child>ch</child>
  <child>ch</child>
  <child>ch</child>
  <child>ch</child>
 </parent>
 <parent>
  <child>ch</child>
  <child>ch</child>
 </parent>
</root>

David Baudoin wrote:

> Please, what is this solution ?
>
> ----- Original Message -----
> From: "Alessandro Marcellini" <amarcell@tiscalinet.it>
> To: <fop-dev@xml.apache.org>
> Sent: Wednesday, March 21, 2001 4:37 PM
> Subject: Re: Split a table in many tables
>
> > OK,
> > I found a solution!
> >
> > Alessandro Marcellini wrote:
> >
> > > Hi,
> > > I'm a newbie in XML and FOP, i've to tranform a XML document like this:
> > > <?xml version='1.0'?>
> > > <root>
> > >   <child>ch1</child>
> > >   <child>ch2</child>
> > >   <child>ch3</child>
> > >   <child>ch4</child>
> > >   <child>ch5</child>
> > >   <child>ch6</child>
> > >   <child>ch7</child>
> > >   <child>ch8</child>
> > >   <child>ch9</child>
> > > </root>
> > > Into another like this:
> > > <?xml version='1.0'?>
> > > <root>
> > >   <parent>
> > >     <child>ch1</child>
> > >     <child>ch2</child>
> > >     <child>ch3</child>
> > >     <child>ch4</child>
> > >     <child>ch5</child>
> > >   </parent>
> > >   <parent>
> > >     <child>ch6</child>
> > >     <child>ch7</child>
> > >     <child>ch8</child>
> > >     <child>ch9</child>
> > >   </parent>
> > > </root>
> > > Becose I've to split the first document in different table and pages.
> > > Anyone has some idea about the syntax of the stylesheet that I've to
> > > use?
> > > Thank's
> > >         Alessandro
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> > > For additional commands, email: fop-dev-help@xml.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> > For additional commands, email: fop-dev-help@xml.apache.org
> >
> >


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Mime
View raw message