
Originally Posted by
Tony Marston
6 weeks
You could do it in 4 weeks if you used PHP templates instead of XSL templates 
HTML Code:
<xsl:when test="$mode='read'>
<xsl:choose>
<xsl:when test="$item='T' or $item='t' or $item='Y' or $item='y' or $item='1'">
<xsl:text>Yes</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>No</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
PHP Code:
<?php if ($mode=='read'): ?>
<?php if ($item): ?>
Yes
<?php else: ?>
No
<?php endif; ?>
<?php endif; ?>
This doesn't show the code Tony had to write to convert PHP's true to 'T', 't', 'Y', 'y' or '1' before he sent it to his template engine. Without an intermediate XML stage, we have less coding to do.
Douglas
Bookmarks