GNOME Bugzilla – Bug 60304
xsl:fallback seems not to work
Last modified: 2009-08-15 18:40:50 UTC
If <xsl:fallback> is used with an unknown instruction, the xsl processor should use the template supplied with <xsl:fallback> instead of aborting. Xsltproc fails here: bash-2.05$ !xs xsltproc fallback.xsl autos.xml compilation error: file fallback.xsl line 9 element foo-of xsltStylePreCompute: unknown xsl:foo-of xsltApplyOneTemplate: foo-of was not compiled bash-2.05$ xsltproc -v bash-2.05$ xsltproc -V Using libxml 20403, libxslt 10003 and libexslt 301 xsltproc was compiled against libxml 20403, libxslt 10003 and libexslt 301 libxslt 10003 was compiled against libxml 20403 libexslt 301 was compiled against libxml 20403
Created attachment 5577 [details] xslt-Script that is using <xsl:fallback>
Okay, I have at least fixed this use case of xsl:fallback : http://cvs.gnome.org/bonsai/cvsquery.cgi?module=libxslt&branch=HEAD&branchtype=match&dir=libxslt&file=&filetype=match&who=veillard&whotype=match&sortby=Date&hours=&date=explicit&mindate=09%2F11%2F01+07%3A44&maxdate=09%2F11%2F01+07%3A46&cvsroot=%2Fcvs%2Fgnome orchis:~/XSLT/tests/general -> xsltproc bug-60.xsl ../docs/bug-60.xml compilation error: file bug-60.xsl line 6 element foo-of xsltStylePreCompute: unknown xsl:foo-of <?xml version="1.0"?> <result>An error occoured, foo-of not known</result> orchis:~/XSLT/tests/general -> it will still complain at compilation time but that's normal and should be preserved.
This should be closed in release 1.0.4, thanks, Daniel