<div>I am running into an issue with XSLT signing and need an expert help in resolving the issue. </div>
<div> </div>
<div>I just did quite R&D on XML digital signature for JDOM and am following the below steps.</div>
<div>1)Convert an XML file into JDOM</div>
<div>2)Convert JDOM into DOM</div>
<div>3)To set the namespace aware true so that XSLT signature works.</div>
<div>Store the w3c DOM to an inputstream tho' outputstream as follows</div>
<div>org.apache.xml.security.utils.XMLUtils.outputDOMc14nWithComments(docSign, os);</div>
<div>4)Then set the namespace aware and parse the w3c DOM stored in an inputstream.</div>
<div>DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();<br>dbf.setNamespaceAware(true);</div>
<div>5)singed the DOM after setting namespace aware true.</div>
<div> </div>
<div>I am getting the following error when i parse the DOM that is in the inputstream which was converted from JDOM</div>
<div><font color="#ff0000" size="2">[Fatal Error] :-1:-1: Premature end of file.</font></div>
<div> </div>
<div>can any expert guide me the right way to resolve the issue/to implement signing for JDOM.</div>
<div>Note : The URI signing works in this way not the XSLT signing.</div>
<div> </div>
<div> </div>
<div> </div>
<div><?xml version="1.0" encoding="UTF-8" ?> <br><Flow Id="new" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>">
<br><Empid>121212</Empid><br><Salary>120000</Salary><br><Command><br> <xsl:stylesheet version="1.0" xmlns:xsl="<a href="http://www.w3.org/1999/XSL/Transform">http://www.w3.org/1999/XSL/Transform
</a> "><br> <xsl:template match="/"><br> <xsl:copy-of select="Flow/Salary"/><br> </xsl:template><br> </xsl:stylesheet><br></Command>
<br><Skills><br> <xsl:stylesheet version="1.0" xmlns:xsl="<a href="http://www.w3.org/1999/XSL/Transform">http://www.w3.org/1999/XSL/Transform</a>"><br> <xsl:template match="/">
<br> <xsl:copy-of select="Flow"/><br> </xsl:template><br></xsl:stylesheet><br></Skills><br></Flow></div>
<p> </p><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:jdom-interest@jdom.org"></a>