You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Zahidul Islam <fa...@yahoo.com> on 2003/05/22 11:40:34 UTC

Showing the name of the elements (user defined xml tag) in pdf using FOP

Hello,
I am new in FOP. I want to publish a report in PDF format from an xml file using FOP. the xml file generates dynamically which is similar to:
<item_details>
    <attirbutes>
       <name>
              This is Value One
       </name>
       <address>
              This is Value Two
       </address>
   <attirbutes>
</item_details>
 
And i want to show the attributes in my pdf file as
 
name : This is Value One
address : This is Value Two
 
the main point is no. of attribute is not defined (i mean it maybe 2 or 3 or 4 ...).As a result in the xsl file how cant i manage the tag name (name, address) so that these can be showed in the pdf file.
 
<xsl:templates match="item_details">
<xsl:apply-templates select="attributes"/>
</xsl:templates>
<xsl:templates match="attributes">
<xsl:apply-templates/>
</xsl:templates>
 
this will print only the values of all the child elements of the <attributes>
But i want to show both the name of the child elements and there values 
separated by colon as shown above.
 
pls help me.


---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.