[jdom-interest] namespace issue

m2 r2sj m2r2sj at gmail.com
Tue May 2 16:49:38 PDT 2006


I am running into an issue with XSLT signing and need an expert help in
resolving the issue.

I just did quite R&D on XML digital signature for JDOM and am following the
below steps.
1)Convert an XML file into JDOM
2)Convert JDOM into DOM
3)To set the namespace aware true so that XSLT signature works.
Store the w3c DOM to an inputstream tho' outputstream as follows
org.apache.xml.security.utils.XMLUtils.outputDOMc14nWithComments(docSign,
os);
4)Then set the namespace aware  and parse the w3c DOM stored in an
inputstream.
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
5)singed the DOM after setting namespace aware true.

I am getting the following error when i parse the DOM that is in the
inputstream which was converted from JDOM
[Fatal Error] :-1:-1: Premature end of file.

can any expert guide me the right way to resolve the issue/to implement
signing for JDOM.
Note : The URI signing works in this way not the XSLT signing.



<?xml version="1.0" encoding="UTF-8" ?>
<Flow Id="new" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Empid>121212</Empid>
<Salary>120000</Salary>
<Command>
  <xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform ">
            <xsl:template match="/">
              <xsl:copy-of select="Flow/Salary"/>
            </xsl:template>
 </xsl:stylesheet>
</Command>
<Skills>
  <xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
            <xsl:template match="/">
              <xsl:copy-of select="Flow"/>
            </xsl:template>
</xsl:stylesheet>
</Skills>
</Flow>


<jdom-interest at jdom.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.jdom.org/pipermail/jdom-interest/attachments/20060502/d3e5305f/attachment.htm


More information about the jdom-interest mailing list