xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: "Aust, Stefan" <stefan.aust AT coremedia.com>
- To: <xom-interest AT lists.ibiblio.org>
- Subject: [XOM-interest] Canonicalization question
- Date: Mon, 17 Oct 2005 15:59:21 +0200
Hi there,
I tried the XC14N implementation of XOM 1.1 b4. The attached test
application emits
<a:a xmlns="urn:a"><a:b></a:b></a:a>
<a:b></a:b>
However I think, it should emit
<a:a xmlns="urn:a"><a:b></a:b></a:a>
<a:b xmlns="urn:a"></a:b>
Is there a way to get my expected result which I have not found?
Thanks,
---8<----
public class A {
static String c(Node n) throws Exception {
ByteArrayOutputStream os = new ByteArrayOutputStream();
new Canonicalizer(os,
Canonicalizer.EXCLUSIVE_XML_CANONICALIZATION).write(n);
return os.toString("UTF8");
}
public static void main(String[] args) throws Exception {
Element e1 = new Element("a:a", "urn:a");
Element e2 = new Element("a:b", "urn:a");
e1.appendChild(e2);
System.out.println(c(e1));
System.out.println(c(e2));
}
}
--
Stefan Matthias Aust
-
[XOM-interest] Canonicalization question,
Aust, Stefan, 10/17/2005
- Re: [XOM-interest] Canonicalization question, Elliotte Harold, 10/17/2005
- Re: [XOM-interest] Canonicalization question, Elliotte Harold, 10/17/2005
- <Possible follow-up(s)>
- Re: [XOM-interest] Canonicalization question, Aust, Stefan, 10/18/2005
Archive powered by MHonArc 2.6.24.