Re: [xslt] An Invalid xpath expression xsl:template/@match node is ignored



On Tue, Jul 31, 2012 at 02:42:42PM +0200, Nicolas Delaby wrote:
> Dear libxslt maintainers,
> I discover that performing a transformation with a invalid xpath
> expression in a template match attribute doesn't prevent the
> transformation to perform and lead to compromise the transformation
> logic.
> Instead, I would expect to have a proper failure like `could not
> compile match expression`
> 
> I attached a stylesheet and xml sample to reproduce the issue.
> 
> result of transformation:
> 
> $ xsltproc xpath-typo.xsl document.xml
> error: file xpath-typo.xsl line 10 element template
> xsltCompilePattern : NULL pattern
> <?xml version="1.0"?>
> <result><bug/><bug/></result>
> $ echo $?
> 0
> 
> 
> version I'm currently using:
> 
> $ xsltproc --version
> Using libxml 20708, libxslt 10126 and libexslt 815
> xsltproc was compiled against libxml 20708, libxslt 10126 and libexslt 815
> libxslt 10126 was compiled against libxml 20708
> libexslt 815 was compiled against libxml 20708
> 
> 
> Is it a bug ? Should I open a ticket in bug tracker ?

  Sounds like a bug, I will try to reproduce and fix it,

    thanks !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


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