Re: [xml] Namespace normalization/reconciliation
- From: Bruce Miller <bruce miller nist gov>
- To: Rich Salz <rsalz datapower com>
- Cc: xml <xml gnome org>
- Subject: Re: [xml] Namespace normalization/reconciliation
- Date: Thu, 29 Jul 2004 17:40:32 -0400
Rich Salz wrote:
This would seem to be an important cleanup operation, even if it
isn't fast, since you pay for the excess declarations everytime
you use the resulting document.
Look at the C14N (canonicalization) code that is part of the library. It
handles things like duplicate xmlns declarations. (It also does more,
like re-ordering attributes, etc., that you might *not* want, but the
semantic information is not changed.)
Ah, interesting...that spelling hadn't occurred to me :>
And in fact there already _is_ a binding to it in XML::LibXML!!
But it does do _quite_ a bit more than I had really wanted!
It drops the XML declaration & doctype, converts empty elements
and canonicallizes all space (& newlines).
Still, it's probably better than dealing with the declarations.
Thanks a lot for the pointer.
/r$
--
Rich Salz Chief Security Architect
DataPower Technology http://www.datapower.com
XS40 XML Security Gateway http://www.datapower.com/products/xs40.html
XML Security Overview http://www.datapower.com/xmldev/xmlsecurity.html
--
bruce miller nist gov
http://math.nist.gov/~BMiller/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]