Problem beim konvertieren mit FOConverter
Errraddicator
- xsl
Tach auch,
ich habe folgendes Problem:
Ich habe jetzt eine XML-Datei die meine Daten enthält und eine XSLT-Datei die FO-Tags zur Formatierung benutzt.
Jetzt wollte ich mit Hilfe von FOConverter daraus eine PDF-Datei erstellen.
Das Programm läuft auch fehlerfrei durch, aber es kommt einfach kein Ergebnis raus.
Wenn ich dann in den Transformationen Optionen FO Processor auf None stelle, dann erhalte ich eine Textdatei die nur die Daten ohne jegliches drumherum enthält.
Was mache ich falsch?
Danke im Voraus
Patrick Sondermann
Hier meine XSLT-Datei (am besten rauskopieren und in Notepad z.b. angucken)
Datei kostenstellen.xsl
-----------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!-- T E M P L A T E S -->
<!-- template that defines the page-formats -->
<xsl:template match="definePageFormats">
fo:layout-master-set
<fo:simple-page-master master-name="A4portrait"
page-width="210mm" page-height="297mm"
margin-top="0cm" margin-bottom="0cm" margin-left="0cm" margin-right="0cm">
</fo:simple-page-master>
<fo:simple-page-master master-name="A4landscape"
page-width="297mm" page-height="210mm"
margin-top="3cm" margin-bottom="0cm" margin-left="0cm" margin-right="0cm">
</fo:simple-page-master>
xsl:apply-templates/
</fo:layout-master-set>
</xsl:template>
<!-- template used for the kostenstellen-page-format -->
<xsl:template match="costplacePage">
<fo:page-sequence master-reference="A4landscape">
xsl:apply-templates/
</fo:page-sequence>
</xsl:template>
<!-- template used for the client-header (caption-part) -->
<xsl:template match="clientCaption">
<fo:block font-family="Courier New" font-size="10pt" font-weight="bold">
xsl:apply-templates/
</fo:block>
</xsl:template>
<!-- template used for the client-header (data-part) -->
<xsl:template match="clientData">
<fo:block font-family="Courier New" font-size="10pt">
xsl:apply-templates/
</fo:block>
</xsl:template>
<!-- template used for the column-header -->
<xsl:template match="columnHeader">
<fo:block font-family="Courier New" font-size="7pt" font-weight="bold">
xsl:apply-templates/
</fo:block>
</xsl:template>
<!-- template used for the branch-header -->
<xsl:template match="branchHeader">
<fo:block font-family="Courier New" font-size="7pt" font-weight="bold">
xsl:apply-templates/
</fo:block>
</xsl:template>
<!-- template used for the costplace-header -->
<xsl:template match="costplaceHeader">
<fo:block font-family="Courier New" font-size="7pt" font-weight="bold">
xsl:apply-templates/
</fo:block>
</xsl:template>
<!-- template used for the staff-data -->
<xsl:template match="staffData">
<fo:block font-family="Courier New" font-size="7pt">
xsl:apply-templates/
</fo:block>
</xsl:template>
<!-- template used for the costplace-sums -->
<xsl:template match="costplaceSums">
<fo:block font-family="Courier New" font-size="7pt" font-weight="bold">
xsl:apply-templates/
</fo:block>
</xsl:template>
<!-- template used for the branch-sums -->
<xsl:template match="branchSums">
<fo:block font-family="Courier New" font-size="7pt" font-weight="bold">
xsl:apply-templates/
</fo:block>
</xsl:template>
<!-- template used for the client-sums -->
<xsl:template match="clientSums">
<fo:block font-family="Courier New" font-size="7pt" font-weight="bold">
xsl:apply-templates/
</fo:block>
</xsl:template>
<!-- template used for blank table-cells -->
<xsl:template match="blankCell">
fo:table-cell
fo:block/
</fo:table-cell>
</xsl:template>
<!-- S T Y L E S H E E T -->
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!-- print each client -->
<xsl:for-each select="kostenstellen/mandant">
<definePageFormats/>
<costplacePage>
fo:flow
<!-- print client-header -->
fo:table-and-caption
fo:table
<fo:table-column column-width="6%"/>
<fo:table-column column-width="14%"/>
<fo:table-column column-width="5%"/>
<fo:table-column column-width="10%"/>
<fo:table-column column-width="30%"/>
<fo:table-column column-width="10%"/>
<fo:table-column column-width="10%"/>
<fo:table-column column-width="5%"/>
<fo:table-column column-width="10%"/>
fo:table-row
fo:table-cell<clientCaption>AG-Nr.:</clientCaption></fo:table-cell>
fo:table-cell<clientData><xsl:value-of select="addisonNummer"/></clientData></fo:table-cell>
<blankCell/>
<blankCell/>
fo:table-cell<clientCaption>Kostenstellenliste - Lohn & Gehalt</clientCaption></fo:table-cell>
<blankCell/>
<blankCell/>
fo:table-cell<clientCaption>Monat:</clientCaption></fo:table-cell>
fo:table-cell<clientData><xsl:value-of select="Monat"/></clientData></fo:table-cell>
</fo:table-row>
fo:table-row
fo:table-cell<clientCaption>Firma:</clientCaption></fo:table-cell>
<fo:table-cell number-columns-spanned="4"><clientData><xsl:value-of select="name"/> - <xsl:value-of select="plz"/> <xsl:value-of select="ort"/></clientData></fo:table-cell>
fo:table-cell<clientCaption>Mandantennr.:</clientCaption></fo:table-cell>
fo:table-cell<clientData><xsl:value-of select="treubuchNummer"/></clientData></fo:table-cell>
fo:table-cell<clientCaption>Seite:</clientCaption></fo:table-cell>
fo:table-cell<clientData><xsl:value-of select="seite"/></clientData></fo:table-cell>
</fo:table-row>
</fo:table>
</fo:table-and-caption>
<!-- print column-headers -->
fo:table-and-caption
<fo:table background-color="#75FF8C">
<fo:table-column column-width="4%"/>
<fo:table-column column-width="19%"/>
<fo:table-column column-width="7%"/>
<fo:table-column column-width="7%"/>
<fo:table-column column-width="7%"/>
<fo:table-column column-width="7%"/>
<fo:table-column column-width="7%"/>
<fo:table-column column-width="7%"/>
<fo:table-column column-width="7%"/>
<fo:table-column column-width="7%"/>
<fo:table-column column-width="7%"/>
<fo:table-column column-width="7%"/>
fo:table-row
fo:table-cell<columnHeader>P-Nr.</columnHeader></fo:table-cell>
fo:table-cell<columnHeader>Name</columnHeader></fo:table-cell>
fo:table-cell<columnHeader>Festgehalt/Lohn</columnHeader></fo:table-cell>
fo:table-cell<columnHeader>Überstunden-Vergütung</columnHeader></fo:table-cell>
fo:table-cell<columnHeader>Tantiemen Prämien u.a.</columnHeader></fo:table-cell>
fo:table-cell<columnHeader>Urlaubsgeld u.a.</columnHeader></fo:table-cell>
fo:table-cell<columnHeader>Fahrgeld Zuschüsse VBG/AG etc.</columnHeader></fo:table-cell>
fo:table-cell<columnHeader>Gesamtbrutto</columnHeader></fo:table-cell>
fo:table-cell<columnHeader>pauschalisierte Lohn/Ki.St.</columnHeader></fo:table-cell>
fo:table-cell<columnHeader>SV-Anteile</columnHeader></fo:table-cell>
fo:table-cell<columnHeader>Spesen u.a.</columnHeader></fo:table-cell>
fo:table-cell<columnHeader>Gesamtkosten</columnHeader></fo:table-cell>
fo:table-cell<columnHeader>Stunden</columnHeader></fo:table-cell>
</fo:table-row>
</fo:table>
</fo:table-and-caption>
<!-- print each branch -->
<xsl:for-each select="filiale">
<!-- print branch-header -->
<fo:block border-bottom-width="1" border-top-width="1" border-right-width="1" border-left-width="1">
<branchHeader>Filiale: <xsl:value-of select="nummer"/></branchHeader>
</fo:block>
<!-- print costplaces -->
</xsl:for-each>
</fo:flow>
</costplacePage>
</xsl:for-each> <!-- kostenstellen/mandant -->
</fo:root>
</xsl:stylesheet>