[jdom-interest] JDOM and XML Signature?

Elliotte Rusty Harold elharo at metalab.unc.edu
Wed Jun 23 07:07:47 PDT 2004

At 11:13 AM +0200 6/23/04, Laurent Bihanic wrote:
>Per Norrman wrote:
>>  First item to do would probably be a mechanism for producing
>>  canonical XML from a JDOM tree. An XMLOutputter subclass or re-write,
>>  perhaps. Maybe someone already did it?
>Elliotte wrote a Canonicalizer for XOM. Maybe he could contribute one
>for JDOM  ;-)

I did start this several years ago before I conceived of XOM. At the 
time I got stymied because XMLOutputter didn't provide enough access 
to its internals to make this work. Namespaces were a special 
problem. This directly influenced the design of the XOM Serializer 
class. When I wrote that I made sure subclassers would have enough 
access to output canonical XML. I also put Serializer in the same 
package as the core classes.

Possibly changes made to JDOM since then would make this approach 
more possible now. If not, you would need to write a direct 
Canonicalizer class that did not rely on XMLOutputter.

>But, if I remember well, some JDOM features such as EntityRef are 
>not compatible with canonical XML.

That's correct. It's impossible to canonicalize a document containing 
unresolved entity references.

   Elliotte Rusty Harold
   elharo at metalab.unc.edu
   Effective XML (Addison-Wesley, 2003)

More information about the jdom-interest mailing list