AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Programmieren allgemein XML Delphi For each -> Seitenwechsel -> Name auf jeder neuen Seite
Thema durchsuchen
Ansicht
Themen-Optionen

For each -> Seitenwechsel -> Name auf jeder neuen Seite

Ein Thema von sirarcher · begonnen am 2. Feb 2008 · letzter Beitrag vom 2. Feb 2008
 
sirarcher

Registriert seit: 7. Mär 2007
22 Beiträge
 
#1

For each -> Seitenwechsel -> Name auf jeder neuen Seit

  Alt 2. Feb 2008, 16:51
Hallo,

ich habe folgendes Problem. Bekomme folgendes XML.

XML-Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<root>
  <Contents>
    <ProductGroup>
      <Name>PG X</Name>
   <Product>
     <Name>Produkt X</Name>
   </Product>
   <Product>
     <Name>Produkt X</Name>
   </Product>
     </ProductGroup>
    <ProductGroup>
      <Name>PG X</Name>
   <Product>
     <Name>Produkt X</Name>
   </Product>
   <Product>
     <Name>Produkt X</Name>
   </Product>
     </ProductGroup>
  </Contents>
</root>
Nun muss ich es zum generieren eines PDF's verwenden. So eine Art Inhaltsverzeichnis usw.

Dort sollte aber der Produktgruppenname (/root/Contents/Productgroup/Name) auf jeder neuen Seite wieder angedruckt werden, falls es vorkommt, das sich beim Generieren die Seite wechselt.

Habe meinen "primitiven" XSLT Code auch hier angehängt. Weiß jemand eine Lösung bzw. eine Hilfe?

Danke im Vorraus!

XML-Code:
<xsl:for-each select="root/Contents/ProductGroup">
 <fo:table table-layout="fixed" width="210mm" border-collapse="collapse" border-style="{$borderstyle}" border-width="0.5px" padding="0px">
  <fo:table-column text-align="left" column-width="10mm" />
  <fo:table-column text-align="left" column-width="190mm" />
  <fo:table-column text-align="right" column-width="10mm" />
  <fo:table-body>
      
      <fo:table-row>
   <fo:table-cell />
        <fo:table-cell border-style="{$borderstyle}" border-width="0.5px" padding="0px">
         <fo:block font-family="Arial" font-weight="bold" font-size="{$TableOfContentsProductGroupSize}">
          <xsl:apply-templates select="Name" />
         </fo:block>
        </fo:table-cell>
        <fo:table-cell />
      </fo:table-row>
      
      <xsl:for-each select="Product">
       
       <fo:table-row>
         <fo:table-cell number-columns-spanned="3" text-align="left" border-style="{$borderstyle}" border-width="0.5px" padding="0px">
           <fo:block>*</fo:block>
         </fo:table-cell>
       </fo:table-row>                           
       <fo:table-row>
        <fo:table-cell />
        <fo:table-cell number-columns-spanned="2" text-align="left" border-style="{$borderstyle}" border-width="0.5px" padding="0px">
          <fo:block>
            <xsl:apply-templates select="Name" />
          </fo:block>
        </fo:table-cell>
      </fo:table-row>
    </xsl:for-each>
  </fo:table-body>
 </fo:table>
</xsl:for-each>
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:43 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz