Re: [xslt] Why is an invalid stylesheet parameter value not an error?
- From: Stefan Behnel <stefan_ml behnel de>
- To: xslt gnome org
- Subject: Re: [xslt] Why is an invalid stylesheet parameter value not an error?
- Date: Tue, 15 Apr 2008 15:55:39 +0200
Robert Koberg wrote:
> The subject line is a little misleading. If there is an undeclared
> variable or param then the transform should error out. This is a bug.
> With the extremely clear example from an earlier post, while passing in
> a parameter named 'value', Saxon 6x, Saxon9x, and Xalan error out with
> (a similar message):
>
> SystemID: /home/me/tmp/test.xsl
> Description: Failed to compile stylesheet. 1 error detected.
>
> SystemID: /home/me/tmp/test.xsl
> Location: 4:0
> Description: Variable value has not been declared
>
> -------------
>
> When I run it with xsltproc. The transform succeeds AND fills in the
> variable/param value! Definitely unexpected!
Ahhh, right! I didn't even see that the <xsl:param> declaration was missing
(this was based on a user's bug report).
Still, libxslt behaves the same, even when I add the <xsl:param> declarations.
So, this leaves us with two problems that should raise an error:
- accessing an undeclared variable (e.g. xsl:value-of w/o xsl:param/variable)
- passing an invalid (i.e. non-evaluatable) value as a parameter
Stefan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]