Using fop to generate csv

View: New views
4 Messages — Rating Filter:   Alert me  

Using fop to generate csv

by Danelaw :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello i am new to fop formatting :S and i need help with page formatting .....

i want to put values from an xml into csv in text mode .... the
problem i am having is that when i generate the simple example of
hello world i get a "full page" of text full of white lines, how can i
remove this white lines? i only need to have the file with no pages no
margins etc ..... all text in the same file with my own breaks.

any help or suggestion to see examples will be helpfully


many thx to all

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...


Re: Using fop to generate csv

by ruud grosmann-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 15/10/2009, Danelaw <danelaw@...> wrote:
> Hello i am new to fop formatting :S and i need help with page formatting
> .....
>
> i want to put values from an xml into csv in text mode ....

Hi,
it sounds to me you don't need fop at all, but only xslt. Or do you
plan to make an pdf file with the csv lines?
If the answer is 'no', stick to your xslt style sheet.

regards, Ruud

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...


Re: Using fop to generate csv

by ruud grosmann-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

a short example:

INPUT
<?xml version="1.0" encoding="UTF-8"?>
<woordenlijst>
<titel>zelfstandige naamwoorden, v1.0</titel>
   <term>
      <spaans> abreviatura, la</spaans>
      <nederlands>afkorting </nederlands>
   </term>
   <term>
      <spaans>abrigo, el</spaans>
      <nederlands>jas, bescherming</nederlands>
   </term>
</woordenlijst>

XSLT STYLE SHEET
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="2.0">

  <xsl:output method='text'/>

  <xsl:template match="/woordenlijst">
      <xsl:apply-templates select="term"/>
  </xsl:template>

  <xsl:template match="term">
    <xsl:value-of select='normalize-space(spaans)'/>
    <xsl:text>;</xsl:text>
    <xsl:value-of select='normalize-space(nederlands)'/>
    <xsl:text>
</xsl:text>
  </xsl:template>

</xsl:stylesheet>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...


Re: Using fop to generate csv

by Danelaw :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

but i need the same method for both systems .... i only want to change
the Driver.RENDER_PDF to Driver.RENDER_TEXT
but you are true .... i only need the transformation, perhaps i need
to change all the method and not the form of formatting it.


thx for the example

On Thu, Oct 15, 2009 at 11:40 AM, ruud grosmann <r.grosmann@...> wrote:

> a short example:
>
> INPUT
> <?xml version="1.0" encoding="UTF-8"?>
> <woordenlijst>
> <titel>zelfstandige naamwoorden, v1.0</titel>
>   <term>
>      <spaans> abreviatura, la</spaans>
>      <nederlands>afkorting </nederlands>
>   </term>
>   <term>
>      <spaans>abrigo, el</spaans>
>      <nederlands>jas, bescherming</nederlands>
>   </term>
> </woordenlijst>
>
> XSLT STYLE SHEET
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>                version="2.0">
>
>  <xsl:output method='text'/>
>
>  <xsl:template match="/woordenlijst">
>      <xsl:apply-templates select="term"/>
>  </xsl:template>
>
>  <xsl:template match="term">
>    <xsl:value-of select='normalize-space(spaans)'/>
>    <xsl:text>;</xsl:text>
>    <xsl:value-of select='normalize-space(nederlands)'/>
>    <xsl:text>
> </xsl:text>
>  </xsl:template>
>
> </xsl:stylesheet>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@...
> For additional commands, e-mail: fop-users-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...