Subject: [xsl] Re: [XSL] Implicit Predicate Casting From: Alain <alainb06@xxxxxxx> Date: Sun, 14 Oct 2007 12:56:39 +0200 |
Because when the predicate is not of type "number", then the argument is cast to type "boolean". A non-empty string is cast to boolean true, so all members are exposed. A result tree fragment or temporary tree always casts to boolean true, so all members are exposed.So that would fall under XPath "shortcut" expressions and tricks!
Only when the predicate is of type "number" is the "position()=" implied
Because <xsl:value-of/> acts on only the first of the addressed nodes in document order. All three are being addressed, but only the first is being returned.Ok! So that falls under differences between XSLT1.0 and 2.0
Because that's a compile-time error there is no way around it. There are runtime ways of avoiding version issues encountered during execution:I tried to find a way around and could not. This time I was right then, as there is no way around.
<xsl:if test="system-property('xsl:version')>=2">
</xsl:if>
Ok ;-)... or maybe it's a bug of I.E. that should not complain with this attribute "as" and just ignore it, as Firefox does... or is this behaviour "implementation dependant" ?
(Of course, when I tried on browsers, I changed version of XSL to 1.0)
XSLT 1.0 Section 2.1:
"It is an error for an element from the XSLT namespace to have
attributes with expanded-names that have null namespace URIs
(i.e. attributes with unprefixed names) other than attributes
defined for the element in this document."
I hope this helps. These are actually common questions in the classroom.Yes indeed.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] [XSL] Implicit Predicate , G. Ken Holman | Thread | Re: [xsl] Re: [XSL] Implicit Predic, G. Ken Holman |
[xsl] Wrapping two different elemen, Bruno Nahod | Date | Re: [xsl] Re: [XSL] Implicit Predic, G. Ken Holman |
Month |