Hi,

I want to transform the following XML to PDF:

<?xml version="1.0" encoding="UTF-8"?>
<Bill>
  <Reference>90594.01.53.73</Reference>
  <SendDate>18-08-2003</SendDate>
  <TotalAmount>59.21</TotalAmount>
  <Debtor>
    <Name>de heer A.Debiteur</Name>
    <Address1>Straat 22</Address1>
    <Address2>9999 AA Woonplaats</Address2>
  </Debtor>
  <Creditor>
    <Name>Tandards</Name>
    <AccountNumber>33.44.73.045</AccountNumber>
    <!-- because of p.o.box shitz no specific adress splitting -->
    <Address1>Straat 22</Address1>
    <Address2>9999 AA Woonplaats2</Address2>
  </Creditor>
</Bill>


With the following XSLT:


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
  xmlns:fo="http://www.w3.org/1999/XSL/Format"; exclude-result-prefixes="fo">
  <xsl:output method="xml" version="1.0" omit-xml-declaration="no"
indent="yes"/>
  <xsl:param name="versionParam" select="'1.0'"/> 
   <!-- MATCH ROOT ELEMENT OF XML FILE-->
  <xsl:template match="Bill">
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>  
      <!-- Determine global page format -->
      <fo:layout-master-set>
        <fo:simple-page-master master-name="simpleA4" page-height="297mm"
page-width="210mm" 
                margin-top="0.5cm" margin-bottom="0.5mm" margin-left="0.5mm"
margin-right="0.5mm">
          <fo:region-body/>
        </fo:simple-page-master>
      </fo:layout-master-set>
      <!-- USE GLOBAL PAGE FORMAT IN BLOCK-->
      <fo:page-sequence master-reference="simpleA4">
        <fo:flow flow-name="xsl-region-body">
            <fo:block>
              <xsl:apply-templates/>
            </fo:block>
       </fo:flow>
      </fo:page-sequence>
    </fo:root>
  </xsl:template>   
 <xsl:template match="Reference">
 <fo:block-container position="absolute" left="4cm" top="4cm" right="10cm"
bottom="10cm" 
    border-style="solid" border-width="1pt">
      <fo:block color="red">
        <xsl:value-of select="."/>
      </fo:block>
  </fo:block-container>
 </xsl:template>
 <xsl:template match="Creditor">
 <fo:block-container position="absolute" left="4cm" top="10cm" right="10cm"
bottom="16cm" 
    border-style="solid" border-width="1pt">
      <fo:block color="blue">
        <xsl:value-of select="Name"/>
      </fo:block>
  </fo:block-container>
 </xsl:template>



When I execute this example I get the following results in my pdf:

18-08-2003 59.21 de heer A.Debiteur Straat 22 9999 AA Woonplaats2

 --------------
|90594.01.53.73|
 --------------
 --------------
|Tandards          |
 --------------

But I only want to show the selected values in the pdf and not a trace of
the other non-matched elements in sequence. What can I do to refine my xsl
so that it works the right way?

Thanks,

Ricardo

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

Reply via email to