Re: Problems splitting into multiple cards

On Mon, 16 Jul 2001, Zeenie Louis wrote:

>
> Hi
>
> I'm trying to convert an html into wml page.
>
> My approch is to convert html to xml using Tiday and then xml to wml using xsl
>
> My html consistes of basically table with many rows. So I want to split the wml into multiple cards. Say 10 rows into a card.
>
> But I'm not able to do it in xsl. Can I get some suggestions on this or some code examples that would help me.
>
> Also I'm facing problems with   with Tidy.
>
> Can some one guide me in converting an HTML to WML using Java environment.
>
>
> Thanks
>
> Zeenie Louis

You can do it with XSLT, you just can't necessarily do it cleanly.

Pardon my XSLT; I don't have my reference in front of me right now:

<card>
  <xsl:for-each select="tr">
    <xsl:apply-templates select="."/>
    <xsl:if test="(position() mod 10)==0 and !last()">
      <xsl:text
disable-output-escaping="yes">&lt;/card&gt;&lt;card&gt;</xsl:text>
    </xsl:if>
  </xsl:for-each>
</card>

And don't use &nbsp; with XSLT; use &#160; or &#xa0; instead.

-- 
Ignacio Vazquez-Abrams  <ignacio@openservices.net>

Received on Tuesday, 17 July 2001 00:18:30 UTC