[xmlsec] namespace prefixes on Signature

Aleksey Sanin aleksey at aleksey.com
Wed Feb 15 13:46:22 PST 2006

> First, it seems to me that xmlSecAddChild() should call 
> xmlSearchNsByHref() rather than xmlSearchNs() particularly for the case 
> of Signature and its child elements.  The logic of xmlSearchNs() seems 
> to dislike searching against a namespace with a prefix attached when a 
> prefix is not provided on the call.  I'm reluctant to add that to a 
> patch since it could have unknown impact.

Yes, this is a very good idea! I believe it would solve this problem
quite nicely though it might be a little slower :)

> Second, the *easiest* patch for a namespace prefix is to create an 
> xmlSecTmplSignatureCreateNs() function that has a prefix parameter and 
> then have xmlSecTmplSignatureCreate() call that function with a NULL 
> prefix value.  Some don't like that style though.  The only other 
> alternative is to create a writable global string but that's a bit 
> invasive too.
Sounds like xmlSearchNs() => xmlSearchNsByHref() change should do it
(assuming that user puts the namespace in the document by him/herself).
Though providing this helper function might be a good idea.

> Lastly, a recent post mentioned you prefer patches based upon cvs.  I 
> can't find mention of cvs on your site.

Scroll to the bottom of this page :)



More information about the xmlsec mailing list