You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by Berin Lautenbach <be...@wingsofhermes.org> on 2004/05/12 14:34:29 UTC

Samples now failing

Dims,

I just tried to apply your new code for Merlin-23 and it's flushed out 
that the mega-sample target is now throwing an exception when it creates 
a non XSLT target (and so is the new 23).

I think this is something to do with the new optimisations, but I'll try 
and track it down later this week.

So it's going to take me a little while longer to get the 23 code into 
CVS :<.

Cheers,
	Berin


Re: Samples now failing

Posted by Erwin van der Koogh <vd...@apache.org>.
> +1 (non-binding) to throwing exception as per berin/raul AND fixing
> the sample as per Sean :)

+1 from me as well. If I read it properly it might break some obscure 
applications, but they probably should be thankful for it. Cause I can't 
think of serious situations where it would happen and you wouldn't want to 
throw an exception.

Erwin



>
> -- dims
>
> On Thu, 13 May 2004 08:36:22 -0400, Sean Mullan <se...@sun.com>
> wrote:
>>
>> Berin Lautenbach wrote:
>> > Yup.
>> >
>> > I've also worked out the problem, but I need some advice from everyone
>> > as to the "right" fix.
>> >
>> > The samples create a manifest object that refers to a URI in the rest
>> > of the signature.  At the time the manifest is created, the element
>> > that will hold the relevant Id has not yet been added to the document.
>> > So when the sample calls "generateDigestValues" for the manifest, one
>> > of the references cannot be resolved.
>> >
>> > In the "pre-Raul" (:>) code, that quietly continued.  In the post-raul
>> > code, a run-time exception (indicating an empty input to a transform)
>> > is thrown.
>> >
>> > My personal opinion is that the latter is the correct behaviour.  If
>> > you have a reference in your document, and the Id cannot be resolved,
>> > then the library should throw an exception.
>> >
>> > What do others think?
>>
>> I agree with your opinion. However, I think that this is actually
>> fixable in the test case by making sure that reference-1 is inserted in
>> the document before the manifest is generated.
>>
>> --Sean
>>
>>
>>
>> >
>> > Cheers,
>> >     Berin
>> >
>> >
>> > Davanum Srinivas wrote:
>> >
>> >> np. we should add "mega-sample" target to the "test" itself.
>> >> -- dims
>> >>
>> >> On Wed, 12 May 2004 22:34:29 +1000, Berin Lautenbach
>> >> <be...@wingsofhermes.org> wrote:
>> >>
>> >>> Dims,
>> >>>
>> >>> I just tried to apply your new code for Merlin-23 and it's flushed
>> >>> out that the mega-sample target is now throwing an exception when it
>> >>> creates a non XSLT target (and so is the new 23).
>> >>>
>> >>> I think this is something to do with the new optimisations, but I'll
>> >>> try and track it down later this week.
>> >>>
>> >>> So it's going to take me a little while longer to get the 23 code
>> >>> into CVS :<.
>> >>>
>> >>> Cheers,
>> >>>        Berin
>> >>>
>> >>>
>> >>
>> >>
>> >>
>>
>>





Re: Samples now failing

Posted by Davanum Srinivas <da...@gmail.com>.
+1 (non-binding) to throwing exception as per berin/raul AND fixing
the sample as per Sean :)

-- dims

On Thu, 13 May 2004 08:36:22 -0400, Sean Mullan <se...@sun.com> wrote:
> 
> Berin Lautenbach wrote:
> > Yup.
> >
> > I've also worked out the problem, but I need some advice from everyone
> > as to the "right" fix.
> >
> > The samples create a manifest object that refers to a URI in the rest of
> > the signature.  At the time the manifest is created, the element that
> > will hold the relevant Id has not yet been added to the document.  So
> > when the sample calls "generateDigestValues" for the manifest, one of
> > the references cannot be resolved.
> >
> > In the "pre-Raul" (:>) code, that quietly continued.  In the post-raul
> > code, a run-time exception (indicating an empty input to a transform) is
> > thrown.
> >
> > My personal opinion is that the latter is the correct behaviour.  If you
> > have a reference in your document, and the Id cannot be resolved, then
> > the library should throw an exception.
> >
> > What do others think?
> 
> I agree with your opinion. However, I think that this is actually fixable in
> the test case by making sure that reference-1 is inserted in the document
> before the manifest is generated.
> 
> --Sean
> 
> 
> 
> >
> > Cheers,
> >     Berin
> >
> >
> > Davanum Srinivas wrote:
> >
> >> np. we should add "mega-sample" target to the "test" itself.
> >> -- dims
> >>
> >> On Wed, 12 May 2004 22:34:29 +1000, Berin Lautenbach
> >> <be...@wingsofhermes.org> wrote:
> >>
> >>> Dims,
> >>>
> >>> I just tried to apply your new code for Merlin-23 and it's flushed out
> >>> that the mega-sample target is now throwing an exception when it creates
> >>> a non XSLT target (and so is the new 23).
> >>>
> >>> I think this is something to do with the new optimisations, but I'll try
> >>> and track it down later this week.
> >>>
> >>> So it's going to take me a little while longer to get the 23 code into
> >>> CVS :<.
> >>>
> >>> Cheers,
> >>>        Berin
> >>>
> >>>
> >>
> >>
> >>
> 
>

Re: Samples now failing

Posted by Berin Lautenbach <be...@wingsofhermes.org>.
Sean Mullan wrote:

> I agree with your opinion. However, I think that this is actually 
> fixable in
> the test case by making sure that reference-1 is inserted in the document
> before the manifest is generated.

<GRIN>.  I did my normal trick of not saying everything.  Yes - that's 
correct, and it's what I was going to do.  (Actually, I was simply going 
to remove the separate generation of the manifest digests as the line is 
redundant.  These get generated during signing.)

Cheers,
	Berin

Re: Samples now failing

Posted by Sean Mullan <Se...@Sun.COM>.
Berin Lautenbach wrote:
> Yup.
> 
> I've also worked out the problem, but I need some advice from everyone 
> as to the "right" fix.
> 
> The samples create a manifest object that refers to a URI in the rest of 
> the signature.  At the time the manifest is created, the element that 
> will hold the relevant Id has not yet been added to the document.  So 
> when the sample calls "generateDigestValues" for the manifest, one of 
> the references cannot be resolved.
> 
> In the "pre-Raul" (:>) code, that quietly continued.  In the post-raul 
> code, a run-time exception (indicating an empty input to a transform) is 
> thrown.
> 
> My personal opinion is that the latter is the correct behaviour.  If you 
> have a reference in your document, and the Id cannot be resolved, then 
> the library should throw an exception.
> 
> What do others think?

I agree with your opinion. However, I think that this is actually fixable in
the test case by making sure that reference-1 is inserted in the document
before the manifest is generated.

--Sean

> 
> Cheers,
>     Berin
> 
> 
> Davanum Srinivas wrote:
> 
>> np. we should add "mega-sample" target to the "test" itself.
>> -- dims
>>
>> On Wed, 12 May 2004 22:34:29 +1000, Berin Lautenbach
>> <be...@wingsofhermes.org> wrote:
>>
>>> Dims,
>>>
>>> I just tried to apply your new code for Merlin-23 and it's flushed out
>>> that the mega-sample target is now throwing an exception when it creates
>>> a non XSLT target (and so is the new 23).
>>>
>>> I think this is something to do with the new optimisations, but I'll try
>>> and track it down later this week.
>>>
>>> So it's going to take me a little while longer to get the 23 code into
>>> CVS :<.
>>>
>>> Cheers,
>>>        Berin
>>>
>>>
>>
>>
>>



Re: Samples now failing

Posted by Berin Lautenbach <be...@wingsofhermes.org>.
Yup.

I've also worked out the problem, but I need some advice from everyone 
as to the "right" fix.

The samples create a manifest object that refers to a URI in the rest of 
the signature.  At the time the manifest is created, the element that 
will hold the relevant Id has not yet been added to the document.  So 
when the sample calls "generateDigestValues" for the manifest, one of 
the references cannot be resolved.

In the "pre-Raul" (:>) code, that quietly continued.  In the post-raul 
code, a run-time exception (indicating an empty input to a transform) is 
thrown.

My personal opinion is that the latter is the correct behaviour.  If you 
have a reference in your document, and the Id cannot be resolved, then 
the library should throw an exception.

What do others think?

Cheers,
	Berin


Davanum Srinivas wrote:

> np. we should add "mega-sample" target to the "test" itself. 
> 
> -- dims
> 
> On Wed, 12 May 2004 22:34:29 +1000, Berin Lautenbach
> <be...@wingsofhermes.org> wrote:
> 
>>Dims,
>>
>>I just tried to apply your new code for Merlin-23 and it's flushed out
>>that the mega-sample target is now throwing an exception when it creates
>>a non XSLT target (and so is the new 23).
>>
>>I think this is something to do with the new optimisations, but I'll try
>>and track it down later this week.
>>
>>So it's going to take me a little while longer to get the 23 code into
>>CVS :<.
>>
>>Cheers,
>>        Berin
>>
>>
> 
> 
> 

Re: Samples now failing

Posted by Davanum Srinivas <da...@gmail.com>.
np. we should add "mega-sample" target to the "test" itself. 

-- dims

On Wed, 12 May 2004 22:34:29 +1000, Berin Lautenbach
<be...@wingsofhermes.org> wrote:
> 
> Dims,
> 
> I just tried to apply your new code for Merlin-23 and it's flushed out
> that the mega-sample target is now throwing an exception when it creates
> a non XSLT target (and so is the new 23).
> 
> I think this is something to do with the new optimisations, but I'll try
> and track it down later this week.
> 
> So it's going to take me a little while longer to get the 23 code into
> CVS :<.
> 
> Cheers,
>         Berin
> 
>