Jump to content

rania1483

Members
  • Posts

    2
  • Joined

  • Last visited

rania1483's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. 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.
  2. 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.
×
×
  • Create New...