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

xsl:if formatting problem

Subject: xsl:if formatting problem
From: Phillip Padgett <pdp@xxxxxxxxxxxxxxx>
Date: Fri, 31 Mar 2000 09:03:59 -0500 (EST)
xsl if compound test
I have a stylesheet which optionally takes a parameter to offset the
header xml file which I am importing by a certain percent.  However I am
having trouble getting the xsl:if to work. 
I am using XT on Solaris 2.6, JDK 1.2.

The error is 
file:/usr/users/pdp/webs/stylesheets/general.xsl:59: mismatched end tag:
expected "td" but got "xsl:if"

I realize it wants me to close the td but I want to close it later.  What
is the way around this?  Alternatively it seems I have to write many more
compound tests testing for different scenarios of $centeroffset and
@header.

Thanks for any help.  My code is below:

   <xsl:if test="string-length($centeroffset)>0">
      <table width="100%">
      <tr>
         <td width="{$centeroffset}"/>
         <td>
   </xsl:if>
   <xsl:if test="string-length(@header)=0">
      <xsl:apply-templates select="document($header-fancy)"/>
   </xsl:if>
   <xsl:if test="string-length(@header)>0">
      <xsl:apply-templates select="document($header)"/>
   </xsl:if>
   <xsl:if test="string-length($centeroffset)>0">
      </td></tr></table>
   </xsl:if>



Phil Padgett                         Coordinator Computer Applications
pdp@xxxxxxxxxxxxxxx                  Division of Biostatistics
http://www.biostat.ufl.edu/~pdp      University of Florida


 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.