Neverthless, just for the record, please note
Sarissa.setXslParameter(xslDoc, "pos", pos+"");
xml.transformNodeToObject(xslDoc, xmlResult); ----> Works OK
Sarissa.setXslParameter(xslDoc, "pos", pos);
xml.transformNodeToObject(xslDoc, xmlResult); ----> DOES NOT
processor.setParameter(null, "pos", pos);
var xmlResult = processor.transformToDocument(xmlDoc);
----> Works OK
processor.setParameter(null, "pos", pos+"");
var xmlResult = processor.transformToDocument(xmlDoc);
----> DOES NOT
Works OK = $pos is recognized as a number so (//Menu)[$pos] gives the
Menu as position $pos
DOES NOT = $pos is NOT recognized as a number so (//Menu)[$pos] gives
ALL the Menu nodes, as just //Menu does.
On Wed, 19 Jan 2005 18:10:20 -0000, Michael Kay <mike(_at_)saxonica(_dot_)com>
wrote:
The $pos is defined like
<xsl:param name="pos" select="0"/>
That's certainly a number
I think it's only a number as long as it doesn't get overridden - as
soon as you pass in the value a parameter it becomes a string.
Of course: I missed that.
Shows how useful it is to declare your types in XSLT 2.0.
Michael Kay
http://www.saxonica.com/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--