Re: [xslt] Abort processing unknown variables inside translation
- From: Justin Fletcher <justin fletcher ntlworld com>
- To: xslt gnome org
- Subject: Re: [xslt] Abort processing unknown variables inside translation
- Date: Sat, 06 Oct 2001 11:29:20 +0100
In message <20011006060318.K10948@redhat.com>
Daniel Veillard <veillard@redhat.com> wrote:
> On Sat, Oct 06, 2001 at 10:06:34AM +0100, Justin Fletcher wrote:
> > A quick look at the code in xpath shows a number of places where valuePush
> > (which I assume is the converse of valuePop) is called with the result of
> > xmlXPathObjectCopy - a function which can return NULL on memory allocation
> > failure and if passed a NULL. I don't know if that's a fault or safe in the
> > positions it has been used, but it's a potential place where a null might
> > come from.
>
> Could you try to apply the following patch, I hope it will fix most
> of those problems:
>
> http://cvs.gnome.org/bonsai/cvsquery.cgi?module=gnome-xml&branch=HEAD&branchtype=match&dir=gnome-xml&file=&filetype=match&who=veillard&whotype=match&sortby=Date&hours=&date=explicit&mindate=10%2F06%2F01+05%3A58&maxdate=10%2F06%2F01+06%3A00&cvsroot=%2Fcvs%2Fgnome
With the patches applied, I get :
*@.xsltproc test.xsl test.xml
runtime error: file test.xsl line 7 element value-of
unregistered variable one
runtime error: file test.xsl line 7 element value-of
unregistered variable one
xmlXPathRunEval: parameter error
xmlXPathEval: 1 object left on the stack
runtime error: file test.xsl line 7 element value-of
xsltValueOf: text copy failed
*
Which is pretty much what I'd expect for that case; thank you for the fix
:-)
I don't quite understand why there's one object left on the stack, but I
guess that might be the 'translate' reference since its parameters failed
to be evaluated. If that's the case, it might be possible that if there
were other parameters on the stack that might make the translate succeed
but on the wrong data. Of course, I'm probably completely wrong :-)
Thanks once again!
--
Gerph {djf0-.3w6e2w2.226,6q6w2q2,2.3,2m4}
URL: http://www.movspclr.co.uk/
... Eyes to the heavens, screaming at the sky;
Trying to send you messages, but choking on goodbye.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]