XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 11th, 2002, 12:55 PM
99miles 99miles is offline
#-------------------------
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: you s of a
Posts: 35 99miles User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
ASP - addparameter to XSL

Why wont this work!!??? I am not getting an error, but it simply wont sort by the parameter I pass from the asp page. If I dont pass a parameter, and sort by a non-variable, it sorts fine.

in my asp page:
objProc.addParameter "orderBy", "owner"

in my xsl page:
....stuff here
<xslaram name="orderBy" select="owner"/>
....stuff here
<xsl:for-each select='/plcDocs/plc'>
<xsl:sort select="$orderBy"/>
<tr bgcolor="#999966">
<td>
<a>
<xsl:attribute name="href">
<xsl:value-of select="path"/>
</xsl:attribute>
<xsl:value-of select="title"/>
</a>
</td>
<td colspan="2">
<xsl:value-of select="owner"/>
</td>
<td colspan="2">
<xsl:value-of select="status"/>
</td>
<td colspan="2">
<xsl:value-of select="revDue"/>
</td>
</tr>
</xsl:for-each>
....stuff here

again, everything works fine if i dont try to pass the parameter. so, if my xsl sort tag is simply:
<xsl:sort select="owner"/>
then it sorts by the 'owner' node.

Any ideas? I'm stumped.
Thanks a ton
-Mac

Reply With Quote
  #2  
Old November 26th, 2003, 05:14 AM
grimmy grimmy is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 1 grimmy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Mac,

Think you need some extra (single) quotes round the select attribute; try this:

<xslaram name="orderBy" select="'owner'" />

Grimmy

Reply With Quote
  #3  
Old December 1st, 2003, 05:47 AM
lorenzoconforti lorenzoconforti is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Italy, milan
Posts: 1 lorenzoconforti User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
evaluation

I don't know much about asp but I think It's not working because the xsl engine expects a value, not to perform an evaluation. You can deal with it doing:

<xsl:sort select="*[name()=$orderBy]"/>

By,
Lorenzo

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > ASP - addparameter to XSL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT