Subject: [xsl] Changing table cell attributes problem From: munna@xxxxxxxxxx Date: Fri, 30 Jul 2004 05:51:59 -0500 |
Dear all, I have the following kind of table (see below), and need to do a couple of things: (1) Make an identity transform so that the output will have cell widths given in colspec/@colwidth, rather than within individual entries as @width. (2) Sometimes both colspec/@colwidth and entry/@width are given. If that happens, ensure that the specified entry/@width matches the corresponding @colwidth. If not, remove the @width from the entry, but add a new element <query> next to the entry with the @width value as its content. I am not at all sure how to do this. The basic identity transform I have is like this: <xsl:output method="xml" indent="no" omit-xml-declaration="yes"/> <xsl:template match="/|@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> <!-- Then I guess I should have a template doing the table-related transformation --> </xsl:stylesheet> I will be really grateful for some help with this problem. Thanks in advance for your help, Munna ------------- Table example: <table> <title>Table Example</title> <tgroup cols="4"> <colspec colnum="1" colname="1" colwidth="100"/> <colspec colnum="2" colname="2"/> <colspec colnum="3" colname="3"/> <colspec colnum="4" colname="4"/> <thead> <row> <entry width="95"> <para>Test</para> </entry> <entry> <para>AAA</para> </entry> <entry> <para>BBB</para> </entry> <entry width="40"> <para>CCC</para> </entry> </row> </thead> <tbody> <row> <entry width="100"> <para>DDD</para> </entry> </row> </tbody> </tgroup> </table> ---------------- -- ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] embedding xsl within java, tim gogl | Thread | [xsl] To preserve line jumps on hav, Javier de Andrés |
Re: [xsl] newbie question, Aad Kamsteeg | Date | [xsl] To preserve line jumps on hav, Javier de Andrés |
Month |