Well yes, this would be a separate application. I have an application that collects comments that can optionally be signed:
<comments xmlns="http://namespace/uri" xmlns:ds=" http://digital/signature/namespace> <comment ID="1"> <ds:Signature/> </comment> <comment ID="2"/> </comments> Between my application and signing comments with Santuario, I'm trying to figure out how to end up with a reasonably formatted comments file at the end of the day. I'm not aware of a pretty-printer that operates at the Node level; i.e., take a Node tree and return a pretty-printed Node tree (by adding the appropriate whitespace/text Nodes). If I'm adding and signing comment #3, I can't pretty print the whole document because comment #1 would break. It's not super-important; I have a UI that shows comments, but for testing and looking through XML, it's helpful to produce formatted output. On Tue, Aug 21, 2012 at 1:38 PM, Cantor, Scott <[email protected]> wrote: > On 8/21/12 1:34 PM, "Michael Bishop" <[email protected]> wrote: > > > >So you can't ask a signature to ignore white space nodes. > > Not in any practical sense. > > > You have to create (or load) the document as you want it formatted > >before signing it: > > > >- Load unformatted Document > >- Pretty Print (to String) > >- (Re)load Document from String > >- Sign > > If you really care enough to do this. Generally that's better left to > other layers and not dealt with at a layer that needs to worry about > security. > > -- Scott > >
