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

RE: Node Order and Value determination

Subject: RE: Node Order and Value determination
From: Jarno.Elovirta@xxxxxxxxx
Date: Wed, 4 Feb 2004 08:41:52 +0200
xpath order values
Hi,

> thanks for the timely reply. The problem is your suggestion doesn't 
> solve my problem.
> 
> I want my xml structure when being transformed to determine for each 
> <OBJECT> element the creation of a corresponding <fo:table-column>
> 
> transform code snippet
> 
> <xsl:template match="TABLE">
>         <fo:table table-layout="fixed" width="7.5in" 
> space-before.optimum="5pt">
>            
>            
>             <!--xsl:call-template name="for-loop"/-->
>             <!--xsl:call-template name="build-columns"/-->
>              <xsl:for-each select="TABLE/DPROW/OBJECT">

This should be

  <xsl:for-each select="DPROW/OBJECT">

>                         <fo:table-column column-width="{6.26 div 
> last()}in"/>
>              </xsl:for-each>
> 
>            
>             <fo:table-body>
>                 <xsl:apply-templates select="*"/>
>             </fo:table-body>
>         </fo:table>
>     </xsl:template>
> creates in my output hundreds of fo:table-column tags.
> 
> xml input file snippet
> 
> <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="842" 
> OCCURENCE="2">
>                     <DPROW>
>                         <OBJECT ALIGN="left" WIDTH="3"/>
>                         <OBJECT>
>                             <TABLE WIDTH="100%" BORDER="0" 
> CELLSPACING="0" CELLPADDING="0" OCCURENCE="2">
>                                 <DPROW>
>                                     <OBJECT WIDTH="4" HEIGHT="6"/>
>                                     <OBJECT WIDTH="22" HEIGHT="6"/>
>                                     <OBJECT WIDTH="67" HEIGHT="6"/>
>                                     <OBJECT WIDTH="2" HEIGHT="6"/>
>                                     <OBJECT WIDTH="211" HEIGHT="6"/>
>                                     <OBJECT WIDTH="2" HEIGHT="6"/>
>                                     <OBJECT WIDTH="273" HEIGHT="6"/>
>                                     <OBJECT WIDTH="48" HEIGHT="6"/>
>                                     <OBJECT WIDTH="92" HEIGHT="6"/>
>                                     <OBJECT WIDTH="2" HEIGHT="6"/>
>                                     <OBJECT WIDTH="2" HEIGHT="6"/>
>                                     <OBJECT WIDTH="82" HEIGHT="6"/>
>                                     <OBJECT WIDTH="6" HEIGHT="6"/>
>                                     <OBJECT WIDTH="22" HEIGHT="6"/>
>                                     <OBJECT WIDTH="5" HEIGHT="6"/>
>                                 </DPROW>
> For the first TABLE/DPROW/OBJECT containing two object 
> elements I would 
> need to create two corresponding fo:table-column tags and for the 
> second  TABLE/DPROW/OBJECT containing fifteen object elements I would 
> need to create fifteen corresponding fo:table-column tags.

What does it create then if not that (after the fix mentioned above)?
 
> What am I doing wrong in the XPath declaration?

It's called "XPath expression". If your stylesheet still doesn't work, please send a complete, simplified example source document with the stylesheet you have so far, *and* example of the desired output.

Cheers,

Jarno - Melotron: Kein Problem (Problemzonen-Mix)

 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.