Re: [xml] Namespace normalization/reconciliation

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.

Rich Salz                  Chief Security Architect
DataPower Technology
XS40 XML Security Gateway
XML Security Overview

bruce miller nist gov

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]