How to properly align rows and columns thru XSLT on blackberry ?

I am trying to display some output ( from sql proc/ email out ) to blackberry. Output is formatted using XSLT. Output has rows and columns. Three columns are numaric, so when numbers vary in digits columns get mis-aligned ( using <xsl:value-of select="format-number(Report/Table3/TOT_MTD,'#####')" />) I have couple of nbsp. Is there a way thru XMLT I can spcify start/end postions or any other way so when digits width vary - spaces are reserved and column alignment sticks. With using <xsl:value-of select="format-number(Report/Table3/TOT_MTD,'000,000.00')" /> works but users do not like leading zeros. Any ideas!
ivan_belalAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BigRatCommented:
I presume you are outputting the data in HTML? If so a simple ALIGN=RIGHT on the TD element should do it?
ivan_belalAuthor Commented:
Output is aligned when viewed in MS Outlook. Same email when viewd in a Blackberry table (rows/columns) does not stick in terms of alignment. I have right on TD. As mentioned I was ok with padding with leading zeros, but users did not like it. Help, thanks.
</td>
                  <td style="text-align:right;">
                        <xsl:value-of select="format-number(Report/Table5/TOT_YTD_MF,'#####', 'us')" />
                        <xsl:text disable-output-escaping="yes"></xsl:text>
                  </td>
BigRatCommented:
It might be that blackberry does not support full CSS style sheeting (style="text-align:right") but the old HTML style. It won't do any harm, just add align=right to the TD element and try that.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

ivan_belalAuthor Commented:
thank you. no luck. attached is my code for your review.
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#160;"> ]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
	<head>
		<title> sales for <xsl:value-of select="Report/Table1/RPT_DATE"/></title>
	</head>
	<body>
		<p>
			<b>(Dly in 000's)</b>  
		<br/>
		<b>(MTD, YTD in mil's)</b>
		</p>
		<br/>
		<p>
			<b>All products sales</b></p>
	
		<table>
			<tr bgcolor="#AAAAAA">
		    	<td>
					<b>Act</b>
					<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;</xsl:text>
				</td>
				<td ALIGN="right">
					<b>Dly</b>
					<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</xsl:text>
				</td>
				<td ALIGN="right">
					
					<b>MTD</b>
					<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</xsl:text>
				</td>
				<td ALIGN="right">
					<b>YTD</b>
					<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</xsl:text>
				</td>
			</tr>
 
			<xsl:apply-templates select="Report/Table2">
			</xsl:apply-templates>
		</table>
 
 
		<tr>
			<td>
				<b>Total</b>
				<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
			</td>
			<td ALIGN="right">
 
				<xsl:value-of select="format-number(Report/Table3/TOT_DLY,'#####', 'us')"/>
 
				<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
			</td>
			<td ALIGN="right">
 
				<xsl:value-of select="format-number(Report/Table3/TOT_MTD,'#####', 'us')" />
 
				<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
			</td>
			<td ALIGN="right">
 
				<xsl:value-of select="format-number(Report/Table3/TOT_YTD,'#####', 'us')" />
 
				<xsl:text disable-output-escaping="yes"></xsl:text>
			</td>
		</tr>
		<br/>
		<p>
			<b>MF sales</b>
		</p>
		<br/>
		<table>
			<tr bgcolor="#AAAAAA">
				<td>
					<b>Act</b>
					<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;</xsl:text>
				</td>
				<td ALIGN="right">
					<b>Dly</b>
					<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</xsl:text>
				</td>
				<td ALIGN="right">
					<b>MTD</b>
					<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</xsl:text>
				</td>
				<td ALIGN="right">
					<b>YTD</b>
					<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</xsl:text>
				</td>
			</tr>
			<xsl:apply-templates select="Report/Table4">
			</xsl:apply-templates>
		</table>
 
 
		<tr>
			<td>
				<b>Total</b>
				<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
			</td>
			<td ALIGN="right">
				<xsl:value-of select="format-number(Report/Table5/TOT_DLY_MF,'#####', 'us')" />
				<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
			</td>
			<td ALIGN="right">
				<xsl:value-of select="format-number(Report/Table5/TOT_MTD_MF,'#####', 'us')" />
				<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
			</td>
			<td ALIGN="right">
				<xsl:value-of select="format-number(Report/Table5/TOT_YTD_MF,'#####', 'us')" />
				<xsl:text disable-output-escaping="yes"></xsl:text>
			</td>
		</tr>
		<br/>
		<p>
			<b>SMA sales</b>
			<br/>
		</p>
		<table>
			<tr bgcolor="#AAAAAA">
				<td>
					<b>Act</b>
					<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;</xsl:text>
				</td>
				<td ALIGN="right">
					<b>Dly</b>
					<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</xsl:text>
				</td>
				<td ALIGN="right">
					<b>MTD</b>
					<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</xsl:text>
				</td>
				<td ALIGN="right">
					<b>YTD</b>
					<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</xsl:text>
				</td>
			</tr>
			<xsl:apply-templates select="Report/Table6">
			</xsl:apply-templates>
		</table>
 
 
		<tr>
			<td>
				<b>Total</b>
				<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
			</td>
			<td ALIGN="right">
				<xsl:value-of select="format-number(Report/Table7/TOT_DLY_SMA,'#####', 'us')" />
				<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;</xsl:text>
			</td>
			<td ALIGN="right">
				<xsl:value-of select="format-number(Report/Table7/TOT_MTD_SMA,'#####', 'us')" />
				<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;</xsl:text>
			</td>
			<td ALIGN="right">
				<xsl:value-of select="format-number(Report/Table7/TOT_YTD_SMA,'#####', 'us')" />
				<xsl:text disable-output-escaping="yes"></xsl:text>
			</td>
		</tr>
 
				
		
	</body>
	
</html>
</xsl:template>
	<xsl:decimal-format name="us" decimal-separator='.' grouping-separator=',' />
	
	<xsl:template match="Report/Table2">
		<tr>
			<xsl:if test="position() mod 2 = 0">
				<xsl:attribute name="bgcolor">#AAAAAA</xsl:attribute>
			</xsl:if>
			<xsl:if test="position() mod 2 = 1">
				<xsl:attribute name="bgcolor">#EEEEEE</xsl:attribute>
			</xsl:if>
 
			<td>
				<xsl:value-of select="F_NM"/>
				<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;</xsl:text>
			</td>
			<td ALIGN="right">
 
				<xsl:value-of select="format-number(DLY,'#####', 'us')"/>
				<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
			</td>
			<td ALIGN="right">
 
				<xsl:value-of select="format-number(MTD,'#####', 'us')"/>
				<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
			</td>
			<td ALIGN="right">
 
				<xsl:value-of select="format-number(YTD,'#####', 'us')"/>
				<xsl:text disable-output-escaping="yes"></xsl:text>
			</td>
 
		</tr>
	</xsl:template>
 
	<xsl:template match="Report/Table4">
		<tr>
			<xsl:if test="position() mod 2 = 0">
				<xsl:attribute name="bgcolor">#AAAAAA</xsl:attribute>
			</xsl:if>
			<xsl:if test="position() mod 2 = 1">
				<xsl:attribute name="bgcolor">#EEEEEE</xsl:attribute>
			</xsl:if>
 
			<td>
				<xsl:value-of select="F_NM"/>
				<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;</xsl:text>
			</td>
			<td ALIGN="right">
				<xsl:value-of select="format-number(DLY_MF,'#####', 'us')"/>
				<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
			</td>
			<td ALIGN="right">
				<xsl:value-of select="format-number(MTD_MF,'#####', 'us')"/>
				<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
			</td>
			<td ALIGN="right">
				<xsl:value-of select="format-number(YTD_MF,'#####', 'us')"/>
				<xsl:text disable-output-escaping="yes"></xsl:text>
			</td>
 
		</tr>
	</xsl:template>
 
	<xsl:template match="Report/Table6">
		<tr>
			<xsl:if test="position() mod 2 = 0">
				<xsl:attribute name="bgcolor">#AAAAAA</xsl:attribute>
			</xsl:if>
			<xsl:if test="position() mod 2 = 1">
				<xsl:attribute name="bgcolor">#EEEEEE</xsl:attribute>
			</xsl:if>
 
			<td>
				<xsl:value-of select="F_NM"/>
				<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;</xsl:text>
			</td>
			<td ALIGN="right">
				<xsl:value-of select="format-number(DLY_SMA,'#####', 'us')"/>
				<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
			</td>
			<td ALIGN="right">
				<xsl:value-of select="format-number(MTD_SMA,'#####', 'us')"/>
				<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
			</td>
			<td ALIGN="right">
				<xsl:value-of select="format-number(YTD_SMA,'#####', 'us')"/>
				<xsl:text disable-output-escaping="yes"></xsl:text>
			</td>
 
		</tr>
		
	</xsl:template>
	
</xsl:stylesheet>
 
  

Open in new window

BigRatCommented:
Got any xml input for me to try (can send it as an e-mail attachment if it is sensitive - I'll delete it when were done)?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ivan_belalAuthor Commented:
Input comes out of a Sql proc. Do not have an XML, but you can visualize or even make a sample test XML yourself if works. Basically four columns. Three of them numaric. First column is text. Any help is appreciated.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.