W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2002

Re: converting from HTML to WML

From: Charles Reitzel <creitzel@rcn.com>
Date: Tue, 07 May 2002 09:40:39 -0400
Message-Id: <>
To: mariam aziz <mariam_louis_aziz@yahoo.com>
Cc: html-tidy@w3.org
Hi Mariam,

I don't mean to give you a hard time, but you are posing your question in 
the wrong place.  I think you would get a better response on an XSLT 
mailing list.  You should be able to locate one at www.xml.org or, perhaps, 

For myself, I am surprised that a WML user agent doesn't calculate cell 
sizes for you - much as HTML browsers do.

good luck,

At 02:57 PM 5/6/2002 -0700, mariam aziz wrote:

>Dear sir
>iam still have the problem of coverting table from HTML to WML
>without presenting it as table by border
>i arriver to an idea but i face some problems in implemening it
>by XSL the idea is
>get the max of length of strings in the previous column of <td>
>then get the string length of previos td in same row
>so calculate space as max-length of prev td in same column+1
>so space between first td and second td in first row calculated as
>max(1,2,3) (length of a,length of ab,length of abc) which is 3
>length of prev td which is length of a which is 1 so final requires space is
>the result will be
>a   xyz
>ab  xyzm
>abc xyzx
>what i implement is getting max string length of prev col
>but problem is getting the length of prev td in same col
>and how can i loop by the result value to generate no of spaces equal to 
>result no
>code which i write
>  <xsl:template match="tr">
>   <xsl:apply-templates/>
>  </xsl:template>
>  <xsl:template match="td">
>   <xsl:variable name="po">
>   <xsl:value-of select="position()"/>
>   </xsl:variable>
><xsl:variable name="o">
><xsl:value-of select="position() div 2"/>
><xsl:if test="$o!='1'">
><xsl:variable name="oy">
><xsl:value-of select="position()"/>
><!-- i have problem here><xsl:variable name="len"><xsl:value-of 
>select="string-length(//tr[position()=$o]/td[position()=$o - 
><xsl:variable name="op">
><xsl:for-each select="//tr/td[position()=$o - 1]">
><xsl:sort select="string-length(.)" order="descending" data-type="number"/>
><xsl:value-of select="string-length(.)"/>
><xsl:variable name="max">
><xsl:value-of select="substring-before($op,'~')"/>
><xsl:variable name="final">
><xsl:value-of select="$max+1-$len"/>
><! another problem how to loop with final value to get spaces>
><xsl:if test="$final>'0'">
><xsl:apply-templates select="td" mode="s"/>
><xsl:text> </xsl:text>
><xsl:value-of select="$final - 1"/>
>  </xsl:template>
>wait for your reply
>please help me
>Do You Yahoo!?
><http://rd.yahoo.com/welcome/*http://health.yahoo.com>Yahoo! Health - your 
>guide to health and wellness
Received on Tuesday, 7 May 2002 09:40:38 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:51 UTC