[xml/sgml] Re: Bug#336280: FTBFS: Unable to stat doc/dtd.html

Mike Hommey mh at glandium.org
Sat Nov 5 19:02:33 UTC 2005


On Sat, Nov 05, 2005 at 07:15:27PM +0100, Raphael Hertzog <raphael at ouaza.com> wrote:
> reassign 336280 logidee-tools
> retitle 336280 XSL files incorrectly use variables in match pattern
> thanks
> 
> Le samedi 05 novembre 2005 à 18:06 +0100, Mike Hommey a écrit :
> > > Thus I'm reassigning the bug. I also attach "ignore.xsl" which can be
> > > used as a minimal test case to reproduce the bug :
> > > $ xsltproc --stringparam trainer false ignore.xsl
> > > XPath error : Undefined variable
> > > not(@trainer=$trainer or $trainer='true' or not(@trainer))
> > >                       ^
> > > compilation error: file ignore.xsl line 9 element template
> > > Failed to compile predicate
> > 
> > I guess this is the same as #334784, but i don't have time to check
> > right now. If you have some time, would you test the patch and see if it
> > helps your problem ?
> 
> I tried and it doesn't help. Actually it looks like #329678 because the
> variable is in a match pattern too ... but I don't understand your
> reasoning for closing the bug.
> 
> If I check the Pattern grammar, it leads "Predicate" which is "[Expr]"
> and Expr can certainly include variables... so I checked the ChangeLog
> of libxslt and by recursion I found this :
> http://bugzilla.gnome.org/show_bug.cgi?id=303289
> http://www.w3.org/TR/xslt#section-Defining-Template-Rules
> 
> I hate when good features are removed because the standard says so
> without explaining why it makes sense ... in particular when I don't
> know any clean workaround to do the same thing. :-(

You can work around with xsl:choose or xsl:if clauses inside the
xsl:template.

If you can tell which files are concerned and where i can find them, i
can help when i have some time for it (or if it's just trivial).

Mike



More information about the Debian-xml-sgml-devel mailing list