Index: trunk/gsdl-documentation/manuals/processing/common.xsl
===================================================================
--- trunk/gsdl-documentation/manuals/processing/common.xsl	(revision 13785)
+++ trunk/gsdl-documentation/manuals/processing/common.xsl	(revision 13861)
@@ -6,4 +6,5 @@
   
   <xsl:template match="Title"><p><b><i><xsl:apply-templates/></i></b></p></xsl:template>
+  
   
   <xsl:template match="Title" mode="Figure">
@@ -15,59 +16,45 @@
   </xsl:template>
   
+  
   <xsl:template match="Title" mode="Table">  	  
     <div style="margin-right:1.7pt;" align="center">
     <b>Table&#160;<xsl:number count="Table[not(@class='hidden')]" level="any"/>&#160;<xsl:apply-templates/></b></div>
   </xsl:template>
+  
 
 	<xsl:template match="NumberedList"><ol><xsl:apply-templates/></ol></xsl:template>
   <xsl:template match="NumberedItem"><li><xsl:apply-templates/></li></xsl:template>
 
+
   <xsl:template match="BulletList">
 	<xsl:if test="not(parent::Bullet)">
-    <ul style="list-style-type: disc;">
-      <xsl:for-each select="Bullet">
-		<li><xsl:apply-templates/></li>
+    <ul style="list-style-type: disc;"><xsl:for-each select="Bullet"><li><xsl:apply-templates/></li>
 		<xsl:if test="BulletList">
-		<xsl:for-each select="BulletList">
-  		  <ul style="list-style-type: disc;"><xsl:for-each select="Bullet"><li><xsl:apply-templates/></li></xsl:for-each></ul>
-		</xsl:for-each>
-		</xsl:if>
-	  </xsl:for-each>
-    </ul>
-    <p/>
-    </xsl:if>
+		<xsl:for-each select="BulletList"><ul style="list-style-type: disc;"><xsl:for-each select="Bullet"><li><xsl:apply-templates/></li></xsl:for-each></ul>
+		</xsl:for-each></xsl:if></xsl:for-each></ul><p/></xsl:if>
   </xsl:template>
+
 
   <xsl:template match="Text">
 	<xsl:choose>
-		<xsl:when test="parent::Indented">
-		  <p style="font-size=12px; color=black; text-align=justify; margin-left=15pt;"><xsl:apply-templates/></p>
-		</xsl:when>
+		<xsl:when test="parent::Indented"><p class="indented"><xsl:apply-templates/></p>	</xsl:when>
 		<xsl:when test="parent::Title|parent::Footnote"><xsl:apply-templates/></xsl:when>
-		<xsl:when test="not(parent::Version) and not(parent::Date) and not(parent::NumberedItem) and not(parent::Bullet)">
-			<p><xsl:apply-templates/></p>
-		</xsl:when>
+		<xsl:when test="not(parent::Version) and not(parent::Date) and not(parent::NumberedItem) and not(parent::Bullet)"><p><xsl:apply-templates/></p></xsl:when>
 		<xsl:otherwise><xsl:apply-templates/></xsl:otherwise>
 	</xsl:choose>    
   </xsl:template>
 
+
   <xsl:template match="CodeLine">  
   <xsl:choose>
-	<xsl:when test="parent::Figure or parent::th">
-	  <div style="margin-top:0pt; margin-right:0in; margin-bottom:0in; margin-left:2pt; margin-bottom:0pt; 
-	font-family: Courier; font-size: 11px"><xsl:apply-templates/></div>
-	</xsl:when>		
-	<xsl:when test="name(preceding-sibling::*[position()=1])='CodeLine' or name(following-sibling::*[position()=1])='CodeLine'">
-	  
-	    <div style="margin-top:0pt; margin-right:0pt; margin-bottom:0pt; margin-left:2em; font-size:10px; font-family:Courier;"><xsl:apply-templates/></div>
-	  
-	</xsl:when>      
+  <!-- codeline in figure or table -->
+	<xsl:when test="parent::Figure or parent::th"><div class="codeline_figure"><xsl:apply-templates/></div></xsl:when>		
+	<!-- consecutive codelines -->
+	<xsl:when test="name(preceding-sibling::*[position()=1])='CodeLine' or name(following-sibling::*[position()=1])='CodeLine'"><div class="codeline"><xsl:apply-templates/></div></xsl:when>      
 	<!-- a single line of code between two text paragraphs -->
-	<xsl:otherwise>
-	  <p><div style="font-size:10px; margin-right:0pt; margin-left:2em; margin-bottom:2px; margin-top:2px; font-family:Courier;">
-	<xsl:apply-templates/></div></p>	  
-  </xsl:otherwise>
+	<xsl:otherwise><div class="codeline_single"><xsl:apply-templates/></div></xsl:otherwise>
   </xsl:choose>  
   </xsl:template>
+  
 
   <xsl:template match="Figure">
@@ -78,5 +65,6 @@
 			<xsl:number count="Figure[Title/SubTitle and substring(translate(@id, '_0123456789', '99999999999'), string-length(@id)-1, string-length(@id))='99']" level="any"/>
    	</xsl:variable>  	  	
-  	<xsl:variable name="no"><xsl:value-of select="$temp_total_figs - $temp_num_of_sub_figs"/></xsl:variable>   
+  	<xsl:variable name="no"><xsl:value-of select="$temp_total_figs - $temp_num_of_sub_figs"/></xsl:variable>
+  	   
     <p/>        
     <xsl:apply-templates select="Title" mode="Figure"><xsl:with-param name="no" select="$no"/></xsl:apply-templates>
@@ -87,5 +75,5 @@
         <tr>
         <xsl:if test="parent::Figure[@class='withLineNumber']">
-        <td><div style="linenumber"><xsl:number value="position()" format="1"/>&#160;&#160;</div></td></xsl:if>
+        <td><div class="linenumber"><xsl:number value="position()" format="1"/>&#160;&#160;</div></td></xsl:if>
         <td><xsl:apply-templates select="."/></td></tr>
       </xsl:for-each>
@@ -98,32 +86,32 @@
   </xsl:template> 
 
+
   <xsl:template match="Table">
-    <p/>
-    <a id="Table_{@id}"/>
+    <p/><a id="Table_{@id}"/>
     <xsl:if test="not(@class='hidden') and not(normalize-space(Title/Text)='')"><xsl:apply-templates select="Title" mode="Table"/></xsl:if>
     <table cellpadding="2pt" cellspacing="2pt">
-        <xsl:if test="not(@class='hidden')">
+    <xsl:if test="not(@class='hidden')">
 	  <xsl:if test="not(../../@class='hidden')"><xsl:attribute name="style">border-collapse:collapse;border:1px solid black;</xsl:attribute></xsl:if>
 	  <xsl:attribute name="rules">rows</xsl:attribute><xsl:attribute name="align">center</xsl:attribute>		
 	</xsl:if>
 	<xsl:if test="@class='hidden'"><xsl:attribute name="width">90%</xsl:attribute><xsl:attribute name="align">center</xsl:attribute></xsl:if>
-        <xsl:for-each select="TableContent/tr">
-          <tr>
+    <xsl:for-each select="TableContent/tr">
+    <tr>
 	  <xsl:if test="not(../../@class='hidden')"><xsl:attribute name="style">border-collapse:collapse;border:1px solid black;</xsl:attribute></xsl:if>
-          <xsl:for-each select="th"><td valign="top"><xsl:if test="File"><xsl:attribute name="align">right</xsl:attribute></xsl:if>
-          <xsl:apply-templates select="node()"/></td></xsl:for-each>
+    <xsl:for-each select="th"><td valign="top"><xsl:if test="File"><xsl:attribute name="align">right</xsl:attribute></xsl:if>
+    <xsl:apply-templates select="node()"/></td></xsl:for-each>
 	  </tr>
-	</xsl:for-each>
+  	</xsl:for-each>
     </table>
     <br/>
   </xsl:template>
     
+
   <xsl:template match="Section">     
-    <a name="Section_{@id}"/>
-    <h3><xsl:if test="not(starts-with(../../@id, 'appendix'))">
+    <a name="Section_{@id}"/><h3><xsl:if test="not(starts-with(../../@id, 'appendix'))">
     <xsl:number level="multiple" format="1.1" count="//Chapter|//Chapter//Section"/>&#160;</xsl:if>
-    <xsl:apply-templates select="Title/Text"/></h3>
-    <xsl:apply-templates select="Content/*"/>
+    <xsl:apply-templates select="Title/Text"/></h3><xsl:apply-templates select="Content/*"/>
   </xsl:template>
+
 
   <xsl:template match="Section" mode="preface">    
@@ -131,4 +119,5 @@
     <xsl:apply-templates select="Content/*"/>
   </xsl:template>
+
 
   <xsl:template match="Subsection">
@@ -138,6 +127,6 @@
   </xsl:template>
   
+  
   <xsl:template match="Part"><a id="Part_{@id}"/><xsl:apply-templates/></xsl:template>    
-
   <xsl:template match="Comment"><xsl:apply-templates/></xsl:template>  
   <xsl:template match="Indented"><p><div style="margin-left: 1em;"><xsl:apply-templates/></div></p></xsl:template>
@@ -146,13 +135,10 @@
   </xsl:template> 
   <xsl:template match="i|b|u"><xsl:element name="{name()}"><xsl:apply-templates/></xsl:element></xsl:template>  
-  <xsl:template match="File"><a href="{@url}" target="_blank"><img src="../{@url}" width="{@width}" height="{@height}" border="0"/></a></xsl:template>
-  
-  
-  
-  <xsl:template match="text()"><xsl:value-of select="."/></xsl:template>
-  
+  <xsl:template match="File"><a href="../{@url}" target="_blank"><img src="../{@url}" width="{@width}" height="{@height}" border="0"/></a></xsl:template>
+  <xsl:template match="text()"><xsl:value-of select="."/></xsl:template>  
   <xsl:template match="Author"><b><xsl:apply-templates/></b></xsl:template>
   <xsl:template match="Affiliation"><i><xsl:apply-templates/></i></xsl:template>
-  <xsl:template name="version_and_date"><p><b><xsl:apply-templates select="Version/Text"/></b>&#160;&#160;<xsl:apply-templates select="Date/Text"/></p></xsl:template>
+  <xsl:template name="version_and_date"><p><b><xsl:apply-templates select="Version/Text"/></b>&#160;&#160;<xsl:apply-templates select="Date/Text"/></p></xsl:template>  
+  
   
   <xsl:template match="Chapter|Appendix|Bibliography" mode="index">
@@ -161,7 +147,9 @@
 </xsl:template>
 
+
   <xsl:template match="Section" mode="index">
   <dt><a href="#Section_{@id}"><xsl:apply-templates select="Title/Text"/></a></dt>  
   </xsl:template>
+
 
 <xsl:template match="Chapter">
@@ -171,5 +159,4 @@
   <xsl:apply-templates select="Content/*"/>
 </xsl:template>
-
   
 
@@ -185,5 +172,5 @@
   	<xsl:value-of select="concat($no, $subtitle)"/>
   </xsl:template>  
-  <xsl:template match="Table" mode="ref"><xsl:number level="any"/></xsl:template>
+  <xsl:template match="Table" mode="ref"><xsl:number count="Table[not(@class='hidden')]" level="any"/></xsl:template>
   <xsl:template match="Chapter" mode="ref"><xsl:number level="any"/></xsl:template>
   <xsl:template match="Section" mode="ref"><xsl:number count="//Chapter|//Chapter//Section" format="1.1" level="multiple"/></xsl:template>
@@ -191,5 +178,5 @@
   
   
-  <xsl:template match="SupplementaryText">
+<xsl:template match="SupplementaryText">
   	<xsl:param name="manual_id" select="''"/>
   	<xsl:param name="manual_lang" select="''"/>  	
@@ -201,4 +188,3 @@
   	</xsl:for-each>
   </xsl:template> 
-  
 </xsl:stylesheet>
