xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Elliotte Harold <elharo AT metalab.unc.edu>
- To: "Aust, Stefan" <stefan.aust AT coremedia.com>
- Cc: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] Canonicalization question 2
- Date: Fri, 21 Oct 2005 06:55:23 -0400
Aust, Stefan wrote:
Hi Elliotte,
Thanks for addressing my first C14N problem so fast. Here's another
problem I stumbled across.
public static void main(String[] args) throws Exception {
Element e1 = new Element("a:a", "urn:a");
//e1.addAttribute(new Attribute("a", "a"));
Element e2 = new Element("b");
e1.appendChild(e2);
System.out.println(c(e1));
}
This prints:
<a:a xmlns:a="urn:a"><b xmlns=""></b></a:a> But I think, it should print:
<a:a xmlns:a="urn:a"><b></b></a:a>
Because if you uncomment the attribute definition it will print
<a:a xmlns:a="urn:a" a="a"><b></b></a:a>
C14N is tricky. I'll have to consult the spec before saying definitively, but I suspect you're right and this looks like a serious bug in the algorithm. Hmm, OK. You're right. This is definitely a bug. The output should be what you think it should be.
--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim
-
[XOM-interest] Canonicalization question 2,
Aust, Stefan, 10/21/2005
- Re: [XOM-interest] Canonicalization question 2, Elliotte Harold, 10/21/2005
- Re: [XOM-interest] Canonicalization question 2, Elliotte Harold, 10/21/2005
Archive powered by MHonArc 2.6.24.