[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Comparing node for identity using union

Subject: Re: 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


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.