xsl-list
[Top] [All Lists]

RE: [xsl] Different results on different server

2009-10-07 11:06:15
Prima facie, looks like an XSLT processor bug.

Please supply a complete but concise source document and stylesheet, and
tell us which XSLT processors you were using on the two environments.

(Is there only one input document? I can think of explanations if there are
more than one.)

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 

 

-----Original Message-----
From: Joelle Tegwen [mailto:tegwe002(_at_)umn(_dot_)edu] 
Sent: 07 October 2009 15:48
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Different results on different server

I cannot fathom why this is not working.

I have the following code:
    <xsl:key name="project" match="project" use="."/>
   
    <xsl:variable name="projects"
        select="//project[generate-id() = 
generate-id(key('project', .))]"/>

    <xsl:template match="/staff">
....
  
And then later I use this like so:
    <xsl:template match="status">
        <xsl:variable name="filter_name" select="filter_name"/>
       
        <xsl:variable name="objects_active"
            select="$projects[$filter_name = 'active'][(_at_)active!=0] |
                            $projects[$filter_name = 
'archived'][(_at_)active=0] |
                            $projects[$filter_name = 
'new'][(_at_)new=1][@active!=0] |
                            $projects[$filter_name = 'all']"/>
       
.....

This works fine on my personal dev environment (LAMP), but 
not on our test server (WIMP) on our test server it says that 
there are no nodes in the $projects collection.

So that's strange enough. but here's the part that has me 
pulling my hair out.
If I add the following to the first block of code:
    <xsl:template match="/staff">
   
    <xsl:value-of select="count($projects)"/> -
    <xsl:value-of select="count(//project[generate-id() = 
generate-id(key('project', .))])"/>

I get:
0 - 19

It doesn't seem to matter how specific I am with the select 
statement for $projects, the answer is the same.

I've used a similar methodology on other pages and I've never 
had an issue with it.

What am I missing here?

Thanks much for your time.
Joelle




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