Hi Folks,
I just produced a use case for a project we are working on with @mlauer's excelent Repeating section as html table in mail post. My output table in the email this workflow produces looks like figure 1.
This is a huge leap forward from the looping mechanism I was using before with my InfoPath form. I want it to look like figure 2 (an Excel mock-up) though with a bold heading and formatted for curreny in the last two columns. I also want to add an additional row at the botom that renders a grand total.
Can anyone tell me how to add the inline CSS styles I need into the following XSLT code?
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <xsl:apply-templates /> </xsl:template> <xsl:template match="Items"> <table border="1" width="100%" style="border-collapse:collapse;background-color:#eee;border:1px solid;color:black;font-size:100%;font-family:arial,helvetica,sans-serif;"> <thead> <tr> <td>Item Number</td> <td>Item Nomenclature</td> <td>Quantity</td> <td>Estimated Unit Cost</td> <td>Total Estimated Cost (USD)</td> </tr> </thead> <tbody> <xsl:apply-templates /> </tbody> </table> </xsl:template> <xsl:template match="Item"> <tr> <xsl:apply-templates select="cv_CurrentRowNumber" /> <xsl:apply-templates select="txt_ItemNomenclature" /> <xsl:apply-templates select="txt_Quantity" /> <xsl:apply-templates select="txt_EstimatedUnitCost" /> <xsl:apply-templates select="cv_TotalEstimatedCost" /> </tr> </xsl:template> <xsl:template match="cv_CurrentRowNumber"> <td> <xsl:value-of select="." disable-output-escaping="yes" /> </td> </xsl:template> <xsl:template match="txt_ItemNomenclature"> <td> <xsl:value-of select="." disable-output-escaping="yes" /> </td> </xsl:template> <xsl:template match="txt_Quantity"> <td> <xsl:value-of select="." disable-output-escaping="yes" /> </td> </xsl:template> <xsl:template match="txt_EstimatedUnitCost"> <td> <xsl:value-of select="." disable-output-escaping="yes" /> </td> </xsl:template> <xsl:template match="cv_TotalEstimatedCost"> <td> <xsl:value-of select="." disable-output-escaping="yes" /> </td> </xsl:template> </xsl:stylesheet>
I am referencing you here @rhia since you have expressed an interest in CSS with your CSS - Nintex Style post.
Thanks,
Patrick