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:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old August 19th, 2002, 01:49 PM
AxiMaxi AxiMaxi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 9 AxiMaxi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question How to pass user-input to XSL variable?

Hi,

How do I pass user-input (like using <INPUT>) to an XSL variable?

Something like this;

<input name="blah" type="text">

and the input string will be in $blah, so I can continue processing it in XSL.

I only want to use XML/XSL, DOM, (D)(X)HTML and/or JavaScript.
No ASP/PHP stuff, it has to be client-side.

But how???

Reply With Quote
  #2  
Old August 19th, 2002, 01:57 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
How are you using xsl client side?

Reply With Quote
  #3  
Old August 19th, 2002, 02:00 PM
AxiMaxi AxiMaxi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 9 AxiMaxi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have an XML 'database' with an XSL file linked.

In the XSL file, I build up the HTML-code to display the XML data. The user-input will be used to filter the data (using keywords), so that only the data that is needed, will be displayed.

Does this answer your question?

Unfortunately the server went down, otherwise I could have given the website...

Reply With Quote
  #4  
Old August 19th, 2002, 02:07 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
I've just never seen xsl used without a server-side language to do the transformation. Is it an IE-only technology?

Reply With Quote
  #5  
Old August 19th, 2002, 02:22 PM
AxiMaxi AxiMaxi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 9 AxiMaxi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Euhm... IE-only? Don't think so...

Check: http://www.w3schools.com/xsl/xsl_languages.asp

The bad thing is, I pass XSL variables to HTML but not the other way around; <img src="{$image_url}"> will work.

Reply With Quote
  #6  
Old August 19th, 2002, 02:40 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Hmm, ya. I don't know how you would pass variables that way. Here's the xsl tag that lets you "receive" the value and specify a default: http://www.w3schools.com/xsl/el_param.asp

Like I said, I'm not sure how you would go about overriding the defaults, though.

Reply With Quote
  #7  
Old August 19th, 2002, 03:00 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
This might help. I think you'd have to use it with the javascript example at w3schools, though: http://msdn.microsoft.com/library/d...ddparameter.asp

Reply With Quote
  #8  
Old August 20th, 2002, 02:06 PM
AxiMaxi AxiMaxi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 9 AxiMaxi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs up

Hey, looks good!
Will have to check it out a bit further, but it seems to be what I am looking for.

You have too much time on your hand?

Reply With Quote
  #9  
Old August 20th, 2002, 02:17 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
I'm often bored, ya
Here's an ie/mozilla transform script. http://webfx.eae.net/dhtml/xmlextras/xmlextras.html

Reply With Quote
  #10  
Old August 21st, 2002, 03:02 PM
AxiMaxi AxiMaxi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 9 AxiMaxi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Lightbulb

I think I got it now: with VBScript (or JavaScript) & DOM you can parse the XML and compare the content of a XML-node to the value of a variable in the script.

Will try so in the next few days and let you know the result
I might even post the script... :P

Reply With Quote
  #11  
Old August 22nd, 2002, 03:10 PM
johnsonxml johnsonxml is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 1 johnsonxml User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to johnsonxml
Question

AxiMaxi,

if you already found the way to solve this prob, please post it.
i also facing the same prob as you.
thanks.

hi, everyone.
nice to meet you.

Reply With Quote
  #12  
Old March 26th, 2003, 12:32 AM
Archie Archie is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 1 Archie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Just What I Need (I think)

Sorry to drag up this old topic, I found it via a google search.

Can anyone help out a newbie on the very same problem?

I have a user input form from which I want to pass multiple variables to an XSL sheet, then build up a table of records that match all th input criteria.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > How to pass user-input to XSL variable?


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 5 hosted by Hostway