xsl-list
[Top] [All Lists]

xsl data type problem? two values appear to be equal but ...

2005-12-13 08:59:23
Here is the opening part of the problem template:
--------------    
<xsl:template match="data-store[(_at_)id=$node-id]">    
    <node type="{local-name(.)}" id="{(_at_)id}" name="{name}">
--------------
This selects the node I expect. So far, so good.
Now, further along in the template I pass a parameter to a called template:

<xsl:with-param name="ds-predecessor" 
select="/fssc/component-list/processes/process[data-sinks/data-sink[.=$node-id]]"
 />

This works, too, but if I define the parameter in this way, no nodes are passed:

<xsl:with-param name="ds-predecessor" 
select="/fssc/component-list/processes/process[data-sinks/data-sink[(_dot_)=(_at_)id]]"
 />

The 'match' treats these two values as the same, but the 'select' seems to 
treat them differently.I have output both values using 'xsl:value-of' and they 
seem the same.  

I also used the compare() function on the two and got a return value of '0'.My 
hypothesis is that they must be of different data types and that's why the 
called template behaves differently when called with one or the other. 

I have been searching the index of XPath 2.0 Programmer's Reference looking for 
a function that will return the data type of a node or variable passed to it, 
but I must have the wrong idea of what I'm looking for, because I can't find 
one.

Will someone kindly tell me why these two are the same and different? Thanks.

-- 
Charles Knell
cknell(_at_)onebox(_dot_)com - email

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



<Prev in Thread] Current Thread [Next in Thread>