home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / wvhtm064.zip / Documentation / XML_Tags
Text File  |  2001-02-04  |  4KB  |  134 lines

  1. The xml tags for the configuration file that wvHtml and friends can read in
  2. are reasonably complex. Here I attempt to document what they are and what
  3. they mean.
  4.  
  5. TABLES
  6. ======
  7.  
  8. Each table is comprised of a number of rows each of which has a number
  9. of cells, cells may be merged vertically with ones below them, and 
  10. horzontially with ones to the right. If a cell is merged with cells to
  11. the right or below, then the other cells that it is merged with will
  12. not trigger a cell event of their own. This is sufficient for html, and
  13. hopefully for other conversions.
  14.  
  15. In word tables are basically a set of unrelated rows one under the other,
  16. in wv these rows are magically combined together and all the figures 
  17. worked out so as to merge these rows into a single table which stands
  18. alone as an entity of its own that knows its number of cols and rows, and
  19. how they match up under eachother.
  20.  
  21. table is defined as so...
  22. <table>
  23. <begin>TAGS</begin>
  24. <end>TAGS</end>
  25. </table>
  26. begin is output at the begin table event and
  27. end is output at the end table event.
  28.  
  29. There are a number of tags which only exist with table, there are
  30. <tablerelwidth/>,     this is the percentage width of the table in
  31. terms of the total page width.
  32. <no_cols/>, this is the maximum number of columns that are in this
  33. table.
  34. <no_rows/>, this is the maximum number of rows that are in this
  35. table.
  36.  
  37. Html example is
  38. <table>
  39. <begin><table width="<tablerelwidth/>" border="1" 
  40. cols="<no_cols/>" rows="<no_rows/>"></begin>
  41. <end></table></end>
  42. </table>
  43.  
  44.  
  45. Rows
  46. ----
  47. Each row is defined as so...
  48. <row>
  49. <begin>TAGS</begin>
  50. <end>TAGS</end>
  51. </row>
  52.  
  53. No tags exist inside a row as yet.
  54.  
  55. Html example is
  56.  
  57. <row>
  58. <begin><tr></begin>
  59. <end></tr></end>
  60. </row>
  61.  
  62. Cells
  63. -----
  64. Cells are defined as
  65. <cell>
  66. <begin>TAGS</begin>
  67. <end>TAGS</end>
  68. </cell>
  69.  
  70. Tags that may exist inside a cell are
  71. <rowspan/>, this is the number of rows that this cell spans
  72. <colspan/>, this is the number of columns that this cell spans,
  73. <cellrelwidth/>, this is the percentage width of the cell in
  74. terms on the total table width, handy for html
  75. <cellrelpagewidth/>, this is the percentage width of the cell in
  76. terms on the total page width, handy for latex
  77. <cellbgcolor/>, this will print the color of the background of the cell
  78. (word can color each cell seperately), the color will be as speced
  79. in the color tags mentioned later
  80.  
  81. Html example is
  82.  
  83. <cell>
  84. <begin><td bgcolor="<cellbgcolor/>" width="<cellrelwidth/>"
  85. rowspan="<rowspan/>" colspan="<colspan/>"></begin>
  86. <end></td></end>
  87. </cell>
  88.  
  89. There exists another tag called lastcell which can be used to handle the last 
  90. cell in each row seperately, lastcell is speced exactly the same as cell,
  91.  
  92. i.e.
  93. <lastcell>
  94. <begin>TAGS</begin>
  95. <end>TAGS</end>
  96. </lastcell>
  97.  
  98.  
  99. USING TABLE TAGS
  100. ----------------
  101.  
  102. Once you have speced out the table, row, cell and optionally the lastcell you
  103. have to place them inside a paragraph tag, this will be explained later on
  104. in this document, but for the moment take a look at this example of putting
  105. it all together.
  106.  
  107. <paragraph>
  108. <begin>
  109. <table.end/>
  110. <table.begin/>
  111. <row.begin/>
  112. <cell.begin/>
  113. </begin>
  114. <end>
  115. <entry.end/>
  116. <cell.end/>
  117. <row.end/>
  118. </end>
  119. </paragraph>
  120.  
  121. This all makes sense in that each end tag is before its containers end tag
  122. so all will work out ok from a html output point of view. There is one
  123. very odd thing here as you can see, the table.end is before the table.begin
  124. this is because as mentioned at the beginning of this section tables in
  125. word are not really tables. There is not a marker in word to show that a
  126. table has ended, so you do not know until the beginning of the next 
  127. paragrah after the table that the table has infact ended. So currently you
  128. test for the end of the previous table in the paragraph directly after it,
  129. the library may provide a workaround for this in the future to allow more 
  130. intuitive behaviour. wv guarantee that an empty dummy paragraph will be
  131. output if necessary to close off all these tags that rely on the following
  132. paragraph to fulfill their dependancies.
  133.  
  134.