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

Re: HTML tag inside <xsl:when></xsl:when> tag

Subject: Re: HTML tag inside <xsl:when></xsl:when> tag
From: Matts Isuls <matts.isuls@xxxxxxxxxxx>
Date: Thu, 21 Feb 2002 09:31:25 +0200
xsl tag inside tag
I'm quite new att this and did not get that:

"What you have to keep in mind is that you are writing well-formed xml, even
if you will produce html at the end.  When you put a start tag within
another element, in this case xsl:when, the close tag for that element has
to be nested properly within that element as well."

And i did not explain my problem properly, but here is the solution that
produces what i expected. Put together for your posts:

<td>
  <xsl:attribute name="align">
    <xsl:choose>
      <xsl:when test="ss:Data/@ss:Type = 'Number'">right</xsl:when>
      <xsl:otherwise>left</xsl:otherwise>
    </xsl:choose>
  </xsl:attribute>
  <xsl:value-of select="ss:Data"/>
</td>


Before i had it in my mind before that this (see below) was OK (wellformed
and all that). Still learning every day.  

<xsl:choose>
  <xsl:when test="ss:Data/@ss:Type = 'Number'">
    <td align="right">
  </xsl:when>
  <xsl:otherwise>
    <td align="left">
  </xsl:otherwise>
</xsl:choose>
<xsl:value-of select="ss:Data"/>
</td>


thanks all
Matts Isuls

 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.