This may very well have fixed one of the problems, but it still did not fix the signature mismatch error I'm getting due to c14n. I'll follow up with a lot more detail in a bit.
/Sam On Mon, 2004-11-15 at 21:26 +0100, Raul Benito wrote: > Raul Benito wrote: > > > > >> > >> > >> Shouldn't the xmlns="" mapping only be added if this mapping is in scope > >> and the ancestor element declaring the mapping is not visible (and since > >> NameSpaceSymbolTable always adds that mapping...). Also I'm not quite > >> sure that I understand the "else if": > >> CanonicalizerBase:canonicalizeXPathNodeSet seems to throw a exception if > >> it finds a attribute node in the _xpathNodeSet which would lead me to > >> assume that the node set would never contain the xmlns node? > >> > >> Might also be that I am completely misunderstanding things. > >> Canonicalization makes my brain hurt... > >> > >> > >> > > > Here it is the patch that I think fix your problem(if you don't know or > is difficult to you to apply the patch ask me privately and I can > provide you a compiled jar). It is not the deffenitive one(the attr > casting are redundant for the HEAD tree) as I'm currently working with a > different thing but it will work for you. > Regards, > > Raul > http://r-bg.com > > Index: Canonicalizer20010315Excl.java > =================================================================== > RCS file: > /home/cvs/xml-security/src/org/apache/xml/security/c14n/implementations/Canonicalizer20010315Excl.java,v > retrieving revision 1.17 > diff -u -r1.17 Canonicalizer20010315Excl.java > --- Canonicalizer20010315Excl.java 24 Sep 2004 20:54:29 -0000 1.17 > +++ Canonicalizer20010315Excl.java 15 Nov 2004 20:22:50 -0000 > @@ -165,7 +165,7 @@ > Iterator it=visiblyUtilized.iterator(); > while (it.hasNext()) { > String s=(String)it.next(); > - Attr key=ns.getMapping(s); > + Attr key=(Attr)ns.getMapping(s); > if (key==null) { > continue; > } > @@ -262,7 +262,7 @@ > } > } > } > - if (!xmlnsDef ) { > + if (isOutputElement && !xmlnsDef ) { > ns.addMapping(XMLNS,"",nullNode); > } > > @@ -282,7 +282,7 @@ > Iterator it=visiblyUtilized.iterator(); > while (it.hasNext()) { > String s=(String)it.next(); > > - Attr key=ns.getMapping(s); > + Attr key=(Attr)ns.getMapping(s); > if (key==null) { > continue; > } > @@ -292,7 +292,7 @@ > Iterator it=this._inclusiveNSSet.iterator(); > while (it.hasNext()) { > String s=(String)it.next(); > - Attr key=ns.getMappingWithoutRendered(s); > + Attr key=(Attr)ns.getMappingWithoutRendered(s); > if (key==null) { > continue; > } > >
