Re: [xslt] Non-existent variable => error?



Hi - I'm not quite sure where your problem is:-

bill@billrouter work $ xsltproc bug.xsl bug.xml
runtime error: file bug.xsl line 5 element B
unregistered variable foo
xmlXPathCompiledEval: evaluation failed
<?xml version="1.0"?>

foo<B span=""/>
bill@billrouter work $ xsltproc --version
Using libxml 20424, libxslt 10020 and libexslt 711
xsltproc was compiled against libxml 20424, libxslt 10020 and
libexslt 711
libxslt 10020 was compiled against libxml 20424
libexslt 711 was compiled against libxml 20424
bill@billrouter work $ date
Thu Oct  3 22:11:10 HKT 2002

Seems to me like "runtime error", "unregistered variable" and
"evaluation failed" somehow don't agree with your assertion that
xslt has "failed silently".

(sorry I'm not quite up to the the latest release - gentoo is a
little slow :-)

Rgds,
Bill

> Hi,
>
> The following style sheet:
>
> <xsl:stylesheet
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> version="1.0">
> <xsl:template match="/">
> foo<B span="{$foo}"/>foo2
> </xsl:template>
> </xsl:stylesheet>
>
>
> gives
>
> <?xml version="1.0"?>
>
> foo<B span=""/>
>
> (independently of the XML input....)
>
> without returning an error, i.e., it fails silently
> after trying to evaluate the variable $foo which
> hasn't been defined. Is that proper behavior? I would
> have expected an error...
>
> Thanks!
> Jerome Pesenti
>
> PS: I am using libxslt-1.0.19






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