xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas L Delmelle <a_l.delme...@pandora.be>
Subject Re: need help with templating issues...
Date Thu, 09 Nov 2006 20:42:06 GMT
On Nov 9, 2006, at 16:13, Ricardo Soe-Agnie wrote:


> I want to transform the following XML to PDF:

I see you're a first-time poster, but to us all it seems like the  
zillionth time:

Such questions actually do not belong on this list. Mulberry's XSLT  
list is much, much better suited. This list is meant for problems/ 
questions wrt using Apache FOP to transform FO into PDF. The XSL  
transform is a separate step, which has very little to do with FOP  

Please try to keep that in mind for the future. Thanks!

On that note, you'll also notice, if you browse the archives, that  
many of us can't resist to offer you an answer anyway, so here we go.

For the nodes for which there is no explicit matching template  
defined, the default template is invoked, which ultimately comes down  

<xsl:template match="*">
   <xsl:apply-templates />

and thus for their text-node children:

<xsl:template match="text() | @*">
   <xsl:value-of select="." />

Two possible solutions:
- either define an empty template for the nodes you don't want to see  
processed, like so

   <xsl:template match="SendDate | TotalAmount | Debtor" />

- or apply-templates to only those nodes you do want to see appear in  
the result, so replace this one here
>       <fo:page-sequence master-reference="simpleA4">
>         <fo:flow flow-name="xsl-region-body">
>             <fo:block>
>               <xsl:apply-templates/>

   <xsl:apply-templates select="Reference | Creditor" />




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

View raw message