S. David Kyle wrote:
).
There are three output methods in XSLT 1.0, html, xml, and text. If you
insensitive) and no namespace then html is the default.
> As a side note, if I change <input> to <input1>, the closing tag does not
> get removed.
>
> Thanks in advance...
>
>
> The style sheet is as follows:
> <xsl:stylesheet version="1.0"
> xmlns:xsl="
http://www.w3.org/1999/XSL/Transform" >
> <xsl:template match="/">
> <HTML>
> <SCRIPT type="text/javascript" language="javascript">
> var parserVersion;
> function window_onload()
> {
> buttontable.style.visibility = "visible";
> buttontable.style.display = "block";
> }
> function ApproveDisapproveFromEmail(sUrl)
> {
> window.open(sUrl, "_blank", "width=600,height=200,
> statusbar=no,menubar=no,toolbar=no, addressbar=no, scrollbars=yes");
> }
> </SCRIPT>
> <BODY>
> <table id="buttontable" style="font-family: sans-serif, Arial,
> Verdana; font-size: 7pt; border-collapse: collapse;visibility:none;
> display:none" border="0" cellpadding="4" cellspacing="0" width="201" >
> <tbody>
> <tr>
> <td width="100px" align="center" vertical-align="center">
> <tr>
> <td width="100px" align="center"
> vertical-align="center">
> <input type = "button" value="Approve"
> id="btnApprove"
> onclick="ApproveDisapproveFromEmail('{//DOCINFO/APPPATH}Approve.htm?&DocumentType={//DOCINFO/DOCTYPE}&DocID={//DOCINFO/DOCID}');" />
>
> </td>
> <td width="1px"></td>
> <td width="100px" align="center"
> vertical-align="center">
> <input type = "button" value="Disapprove"
> id="btnDisapprove"
> onclick="ApproveDisapproveFromEmail('{//DOCINFO/APPPATH}Disapprove.htm?&DocumentType={//DOCINFO/DOCTYPE}&DocID={//DOCINFO/DOCID}');">
> </input>
> </td>
> </tr>
> </td>
> </tr>
> </tbody>
> </table>
> <noscript>
> <table style="font-family: sans-serif, Arial, Verdana;
> font-size: 7pt; border-collapse: collapse" border="0" cellpadding="4"
> cellspacing="0" width="201" >
> <tbody>
> <tr>
> <td width="100px" style="background-color: #C0C0C0"
> align="center" vertical-align="center">
> <A>
> <xsl:attribute name="href">
> <xsl:value-of
> select="concat(//DOCINFO/APPPATH,'Approve.htm?&DocumentType=',//DOCINFO/DOCTYPE, '&DocID=', //DOCINFO/DOCID)"/>
> </xsl:attribute>Approve
> </A>
> </td>
> <td width="1px"></td>
> <td width="100px" style="background-color: #C0C0C0"
> align="center" vertical-align="center">
> <A>
> <xsl:attribute name="href">
> <xsl:value-of
> select="concat(//DOCINFO/APPPATH,'Disapprove.htm?&DocumentType=',//DOCINFO/DOCTYPE, '&DocID=', //DOCINFO/DOCID)"/>
> </xsl:attribute>Disapprove
> </A>
> </td>
> </tr>
> </tbody>
> </table>
> </noscript>
> </BODY>
> </HTML>
> </xsl:template>
> </xsl:stylesheet>
>
> And the code that processes it is as follows:
>
> private string GetApprovalEmailBody(AcDocument Doc)
> {
> string strBody = Doc.GetApprovalEmailBody();
>
> //FORM THE XML
> XmlDocument MainDocument = new XmlDocument();
> string strinfo = "<TOP><DOCINFO><DOCTYPE>" + Doc.Type +
> "</DOCTYPE><DOCID>" + Doc.DocID + "</DOCID><APPPATH>" + Doc.ApplicationPath +
> "</APPPATH></DOCINFO></TOP>";
> MainDocument.LoadXml(strinfo);
>
> //Start the transformation process here
> System.IO.StringReader reader = new
> System.IO.StringReader(MainDocument.InnerXml);
> XPathDocument xmlDoc = new XPathDocument(reader);
> XmlDocument xslPage = new XmlDocument();
> xslPage.Load(Doc.ApplicationPath +
> "Tools/PrepareEmailButtonsHTML.xsl");
> XslCompiledTransform xslDoc = new XslCompiledTransform();
> xslDoc.Load(xslPage);
> System.IO.StringWriter writer = new System.IO.StringWriter();
> xslDoc.Transform(xmlDoc, null, writer);
>
> string strButtonHTML = writer.ToString();
> if (strButtonHTML == "")
> throw (new Exception("Workflow.GetApprovalEmailBody: Error in
> preparing the html for buttons. Please contact the administrator"));
> XmlDocument TopDocument = new XmlDocument();
> TopDocument.LoadXml(strButtonHTML);
>