[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

rrrr, thought i knew template calling??

Subject: rrrr, thought i knew template calling??
From: "Barry van Weldam" <barry@xxxxxxx>
Date: Wed, 12 Nov 2003 17:30:29 +0100
xsl template calling
It is not that i don't know anything (read xpath, xsl-fo for this little project)

Here it is:
Simple xml file like:

<?xml version="1.0"?>
<Root>
 <Table>
  <Header>
   <Data_01>Name01</Data_01>
   <Data_02>Name02</Data_02>
   <Data_03>Name03</Data_03>
  </Header>
  <Row>
   <Data_01>78044</Data_01>
   <Data_02>14-06-2002</Data_02>
   <Data_03>26-07-2002</Data_03>
  </Row>
  <Row>
   <Data_01>78003</Data_01>
   <Data_02>16-09-2002</Data_02>
   <Data_03>25-10-2002</Data_03>
  </Row>
  <Row>
   <Data_01>Total</Data_01>
   <Data_02>null</Data_02>
   <Data_03>null</Data_03>
  </Row>
 </Table>
</Root>

And here a part of my working xsl:

<!-- for each row i select a tmpl per celldo -->
  <xsl:template match="//Row">
    <fo:table-row text-align="right" font-size="10px" >
    <xsl:apply-templates select="Data_01 | Data_02 | Data_03" />
    </fo:table-row>
 </xsl:template>

 <!--Here i use a tmpl for each cell -->
 <xsl:template match="//Row/*">
     <fo:table-cell border="solid black 1 px" border-collapse="collapse" padding-right="5px" padding-top="3px">
         <fo:block>
         <xsl:value-of select="self::node()[not(.='null')]"/>
         </fo:block> 
     </fo:table-cell>
 </xsl:template>

Now i the first part i wanna replace "Data_01 | Data_01 | etc " with an xPath expression.

I thought i could use:
    <xsl:apply-templates select="/*" />
because the Data nodes are the child of node Row, but this doesn't work any ideas?

Sorry for the long post.
Thnks in advanced
Barry




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.