[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: Chris Loschen <loschen@xxxxxxxxxxxxx>
Date: Thu, 05 Feb 2004 11:48:04 -0500
xsl node order
At 05:35 PM 2/4/2004, you wrote:

my xml input file should read as follows

<ROOT>


<TABLE>
  <DPROW>
      <OBJECT>2</OBJECT>
  </DPROW>
</TABLE>
<TABLE>
     <DPROW>
      <OBJECT>1</OBJECT>
  </DPROW>
  <TABLE>
     <DPROW>
      <OBJECT>3</OBJECT>
       <OBJECT>4</OBJECT>
     </DPROW>
   </TABLE><- Closing table tag omitted in error.
</TABLE>

</ROOT>



Also validating my complete xml file within xmlspy returns no validation errors.

OK, then your complete file is somewhat different than your example. The example
still isn't quite right, because it has no root element, which means that there are
two <TABLE> elements at the root. However, I made the adjustment of adding a
root element surrounding what you have (as above), and then took what you
provided as a simplified stylesheet earlier and added the root element of
xsl:stylesheet to that as well as follows:


<xsl:stylesheet version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:fo="http://www.w3.org/199/XSL/Format">

<xsl:template match="TABLE">
<fo:table table-layout="fixed" width="7.5in" space-before.optimum="5pt">
<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/>
</fo:table-body>
</fo:table>
</xsl:template>


</xsl:stylesheet>

I then ran the test file with that stylesheet through xalan, and I got this result from the transformation:

<?xml version="1.0" encoding="UTF-8"?>

<fo:table xmlns:fo="http://www.w3.org/199/XSL/Format" space-before.optimum="5pt" width="7.5in" table-layout="fixed"><fo:table-column column-width="6.26in"/><fo:table-body>

2

</fo:table-body></fo:table>
<fo:table xmlns:fo="http://www.w3.org/199/XSL/Format" space-before.optimum="5pt" width="7.5in" table-layout="fixed"><fo:table-column column-width="6.26in"/><fo:table-body>


1

<fo:table space-before.optimum="5pt" width="7.5in" table-layout="fixed"><fo:table-column column-width="3.13in"/><fo:table-column column-width="3.13in"/><fo:table-body>

      3
       4

   </fo:table-body></fo:table>
</fo:table-body></fo:table>

I don't see any problems with the output, but I gather that you do. What did you expect to come out differently?


--Chris


----------------------------------------------------------------------------------------
Texterity ~ Digital Delivery Made Simple
----------------------------------------------------------------------------------------
Chris Loschen, XML Developer
Texterity, Inc.
144 Turnpike Road
Southborough, MA 01772 USA
tel: +1.508.804.3033
fax: +1.508.804.3110
email: loschen@xxxxxxxxxxxxx
http://www.texterity.com/




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.