Re: [xslt] Abort processing unknown variables inside translation



On Sat, Oct 06, 2001 at 07:13:14AM +0000, Bjorn Reese wrote:
> Justin Fletcher wrote:
> 
> > runtime error: file test.xsl line 7 element value-of
> > unregistered variable one
> 
> Line 7 in test.xsl:
> 
>   <xsl:value-of select="translate('hello','ABCDE',$one)" />
> 
> $one is used without being declared, so it appears to be an error in the
> stylesheet.

  Yes but that error should probably be handled more gracefully :-)
So far libxslt has been fixed to correct errors when processing valid
stylesheets (and there is still some work left), but it may be time
to start fixing the behaviour in case of broken stylesheets. I added
better file/line reporting during the summer, it may be a good idea to
extend this to avoid crashing on corrupted input. It becomes a security
concern.
  In that case it seems that when the evaluation of a parameter fails
the function is still called. Seems relatively simple to fix, will try
to do later. We should also start accumulating regression tests related
to broken input processing.

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]