|
Subject: Re: [xsl] Comparing node for identity using union From: António Mota <amsmota@xxxxxxxxx> Date: Wed, 19 Jan 2005 19:08:29 +0000 |
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@xxxxxxxxxxxx> 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/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Comparing node for identi, Michael Kay | Thread | RE: [xsl] Comparing node for identi, Pieter Reint Siegers |
| Re: [xsl] Good Reference, Luke Shannon | Date | Re: [xsl] How can I conditionaly as, Dimitre Novatchev |
| Month |