xsl-list
[Top] [All Lists]

RE: Comparing node for identity using union

2005-01-19 09:16:00
Hi Jim,

I suggest you could read up a book about XSLT, Michael Kay's XSLT (1.0) 2nd
Edition is great value, see page 83-95, for a start...

Or you could easily google up some useful information on XSLT data types...

Cheers,
<prs/>

-----Original Message-----
From: Jim Neff [mailto:jneff(_at_)blockvision(_dot_)com] 
Sent: Miércoles, 19 de Enero de 2005 08:04 a.m.
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] Comparing node for identity using union

This might be a good time for one of the gurus on this list to briefly
explain data-types in XSLT for us n00bs.

I struggle with this a lot as I am used to procedural languages that will do
data-type converstions for me.

I guess some questions that I'd like to see answered are :

How are variables typed in XSLT?  When the variable is defined or when its
used?

Will XSLT automatically convert data types?  i.e. does "2" = 2  Why or why
not?

Can I just explicity use data-type functions, like number() or string()?  Is
this a good way to do this?


Or if you can point us to resources that explains the foundations of
data-types in XSLT, that would be great.

Thanks,
Jim Neff




-----Original Message-----
From: António Mota [mailto:amsmota(_at_)gmail(_dot_)com]
Sent: Wednesday, January 19, 2005 8:02 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Comparing node for identity using union

Well, when i say it's a bug i'm basing myself on the fact that i've tryed my
xslt with MSXML3, MSXML4, Xalan, Saxon6.5.3, Saxon8.1B, Xsltproc, and using
Javascript /Sarissa DomDocument.transformNodeTo Object and
XSLTProcessor.transformToDocument and this problem occurs ony when using
this last one. But what do i know...

The $pos is defined like 

        <xsl:param name="pos" select="0"/>


and i'm passing the value from Javascript


The sugestion from Jonis also work OK

        <xsl:variable name="snode" select="(//Menu)[number($pos)]"/>


Regards.

--~------------------------------------------------------------------
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>
--~--

--~------------------------------------------------------------------
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>
--~--