Hi Hasalaka,

Comments inline...

On 9/4/06, Hasalaka Waravita <[EMAIL PROTECTED]> wrote:

Ruwan
One of question and a comment
1) Do u consider doing client side caching as well ?, considering most
business scenarios, it can be useful too.


Of course, but not at this moment.

2) Performance of digest algo is not linear with the size of the String, so
it would be useful decide to compute hash(and cache) or not depending on
the
size if the input first


Well, then that depends on the time it takes to 'compute the output and
construct the OM tree' and the 'digest generation and searching the Map'.
But it will be a bit complex. Will see.  A good point.

On 9/4/06, Ruchith Fernando <[EMAIL PROTECTED]> wrote:
>
> Hi Ruwan,
>
> On 9/4/06, Ruwan Linton <[EMAIL PROTECTED]> wrote:
> > Hi Ruchith,
> >
> > Yes of course, but I have several concerns.
> >
> > 1. I am going to use this digest value for caching stuff, and if the
> digest
> > value generation time takes more time than invoking the method itself
> then
> > it is useless. Since we need to convert OMElement to DOM in this
> approach
> > (C14N) it will have some performance drawbacks I guess.
>
> Hmm... DOOM is same as OM ... and it has all properties of OM in
> addition to the DOM behaviour... maybe the additional conversion step
> using the stax events from the partially read soap env and the
> incoming stream might be a bit of an overhead.
>
> >
> > 2. How about comments, my implementation of DOMHASH (That's the normal
> > behaviour of DOMHASH as well) dosent take comments in to account,
which
> is
> > required for checking the equality of two OMNodes, for caching.
>
> Well .. you can do C14N ignoring comments:
>
>         Document doc =
> DocumentBuilderFactory.newInstance
> ().newDocumentBuilder().parse("/path/to/your/xml");
>
>         byte[] out = Canonicalizer.getInstance(
>
> Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS).canonicalizeSubtree(
> doc.getDocumentElement());
>
> >
> > 3. I dont know weather I am right or wrong here (I dont have a deep
> > understanding of C14N), but it takes namespace declarations in to
> account
> > and we need to neglect namespace declarations and subtitue the
namespace
> URI
> > instead.
>
> Good point ... Agreed !
>
> In the case where two XML elements carries different prefixes in
> namespace declarations we cannot use C14N to compare.
>
> Thanks,
> Ruchith
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Thanks,
Ruwan

Reply via email to