Subject: Re: [xsl] Saxon bug in short-circuiting of expressions? From: "Michael(tm) Smith" <smith@xxxxxxxxxxxxxxxxxx> Date: Tue, 25 Jul 2006 05:54:04 +0200 |
Michael Kay <mike@xxxxxxxxxxxx> writes: [quoting a stylesheet in an earlier posting from me] > > <xsl:stylesheet version="1.0" > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > <xsl:output method="text"/> > > <xsl:template match="/"> > > <xsl:if test="function-available('hoge') and > > hoge()">moge</xsl:if> > > </xsl:template> > > </xsl:stylesheet> > > > The function hoge() is not in a namespace. Therefore it has to be a system > function, not an extension function. Referring to a system function that > doesn't exist is a static error, that is, it doesn't depend on whether the > function call is actually executed or not. OK, I see that now. > For system functions the relevant statement is at the end of section 4: > > "the function library consists of the core function library together with > the additional functions defined in [12 Additional Functions] and extension > functions as described in [14 Extensions]; it is an error for an expression > to include a call to any other function" OK. > However, if you change the xsl:stylesheet element to say version="2.0", then > forwards compatibility comes into play, and no error is reported, because of > the rule that you originally quoted. With Saxon 6.5.5 in my environment, even after changing the value of the version attribute to "2.0" (or any other value) in the above stylesheet, I still get an "Unknown system function: hoge" error, and the transformation fails. --Mike
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Saxon bug in short-circui, Michael Kay | Thread | [xsl] [ Answered :) ] Assigning va, David Murphy |
[xsl] Re: building a hierarchical c, mnews-xsl@xxxxxx | Date | Re: [xsl] Comparing to SQL NULL, Florent Georges |
Month |