Jump to content

xsl table


rania1483

Recommended Posts

Hello, I am trying to write an XSl stylesheet for my XML document. The text and paragraphs look good, but when i have a table in XML, i am having troubles setting up the width of the table and columns for e.g:this is table that has 4 columns:<TABLE FRAME="NONE" ORIENT="PORT"> <TGROUP COLS="4"> <COLSPEC COLNUM="1" COLNAME="1" COLWIDTH="10*" COLSEP="0"> <COLSPEC COLNUM="2" COLNAME="2" COLWIDTH="12*" COLSEP="0"> <COLSPEC COLNUM="3" COLNAME="3" COLWIDTH="12*" COLSEP="0"> <COLSPEC COLNUM="4" COLNAME="4" COLWIDTH="14*" COLSEP="0"></TABLE>if I am going to insert a row that spans the 4 columns, i have to hard code the 4 in the colspan attribute. <td colspan= "4"> <xsl:apply-templates select="PARA"/> </td>is there any way that i can make the colspan value be a variable instead of hardcoding the number so that the code written can apply to any table in the xml document.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...