Eureka, you made my day!!!!

There is one small nag however. I build my tree entirely in code and the signing will 
not work unless I save the tree to a file using xmlDocDumpMemory and then reload it 
using xmlParseFile. Is there some initialization I have to do after I add the DTD at 
runtime but before xmlSecDSigCtxSign is called? I use the following code to load the 
DTD (again in Delphi):

dtd := XMLParseDTD(nil, 'mydtd.dtd');
if (rootNode^.ns=nil) or
    (rootNode^.ns^.prefix=nil) then
  dtd^.name := xmlStrDup(rootNode^.name)
else
  dtd^.name := XMLStrDup(PChar((rootNode^.ns^.prefix+':'+rootNode^.name)));
dtd^.systemid := nil;
xmlDoc^.intSubset := dtd;
if (xmlDoc^.children=nil) then
  xmlAddChild(xmlNodePtr(xmlDoc), xmlNodePtr(dtd))
else
  xmlAddPrevSibling(xmlDoc^.children, xmlNodePtr(dtd));

Thank you again! This is the culmination of weeks of frustrating debugging (ok, I'm 
new to XML and dSig).

Regards,
Erik
_______________________________________________
xmlsec mailing list
[EMAIL PROTECTED]
http://www.aleksey.com/mailman/listinfo/xmlsec

Reply via email to