eiteljoh
Dec 13 2004, 03:32 AM
| | i want a simple way to pass a variable to a xsl stylesheet. has anyone had any luck with this?
i basically want to grab a variable out of the URL and use it for an xpath expression to parse out a xml doc. seems rather difficult unless you've got some heavier tools ... |
Reply
mizako
Dec 13 2004, 10:23 AM
QUOTE(eiteljoh @ Dec 13 2004, 03:32 AM) i want a simple way to pass a variable to a xsl stylesheet. has anyone had any luck with this? i basically want to grab a variable out of the URL and use it for an xpath expression to parse out a xml doc. seems rather difficult unless you've got some heavier tools ... I am going to propose you a really not elegant solution However it maybe useful to you. -> Grab the variable out of the URL with PHP. -> Open the XML doc you want to parse with PHP add a line within the variable value in it. -> Then just code your XSL to parse that variable introduced previously in the XML and use it for the xpath expression. I hope i was clear enought. If not PM.
Reply
eiteljoh
Dec 14 2004, 01:05 AM
QUOTE(mizako @ Dec 13 2004, 09:23 PM) I am going to propose you a really not elegant solution However it maybe useful to you. -> Grab the variable out of the URL with PHP. -> Open the XML doc you want to parse with PHP add a line within the variable value in it. -> Then just code your XSL to parse that variable introduced previously in the XML and use it for the xpath expression. I hope i was clear enought. If not PM. Yep, thanks a lot. i'll will give it a try. It's really rather challenging ... maybe someday xlst will support this kind of thing? ....
Reply
mizako
Dec 14 2004, 09:20 AM
Maybe it is supported but from my experience i do not remember it. XSL is some tricky in the beggining but at the end after scratching your head a bit, XSL can transform almost everything. QUOTE(eiteljoh @ Dec 14 2004, 01:05 AM) Yep, thanks a lot. i'll will give it a try. It's really rather challenging ... maybe someday xlst will support this kind of thing? ....
Reply
Similar Topics
Keywords : passing, variable, xsl, passing, variable, xsl
- Vb Variable Help
help with variable (2)
Unexpected T_variable...
Help! (3) I did construct the database connection file which is called "config.php". But, I got some mistake
that has to be solved to continue with working. This is the code itself: //Set the database
values $confg ="alex1985_admin" //Your database username $confg ="" //Your database
user's password $confg ="localhost" //Your host $confg ="books" //Your database name
//Create the function to log into the DB function db_login() { global $confg; $link =
@mysql_connect($confg , $confg , $confg ) or die("Error connecting: " . mysql....
Script Help Required: Undefined Variable
A fault I cannot spot in PHP (3) Hi, when running a PHP script I keep getting the error: QUOTE Notice: Undefined variable: bret
in c:\program files\easyphp1-8\home\poll.php on line 294 Notice: Undefined
variable: bret in c:\program files\easyphp1-8\home\poll.php on line 294 (And,
yes, I get it twice). The code related to the variable is as follows: CODE function
LogString($string,$type) { $t_log = "\n";
$t_log .=
$this->globaldata->server_vars['REMOTE_ADDR']."....
[ Cp ] Testers See Windows Xp Passing Vista
(2) It may be led some users of Windows Vista switched back to Windows XP SP2 and wait until m$ has
released it first Service Pack for Windows Vista Operating System. ** EDIT : DELETE THE QUOTE
FROM POST ** URL : http://news.yahoo.com/s/ap/20071130/ap_o...bCGL1j24cA ....
Php Variable Basics
Where would PHP programmers be without the variable? Learn all about t (9) CODE <?php $var= "This is a variable"; echo $var; ?> Outcome This is
a variable Using what we know about the echo function, we can see that we have created a
variable, and then used the echo command to display it. This is fairly simple, and can have many
uses, but there is much more too it! CODE <?php $var1 = "This is variable
one"; $var2 = "This is variable two"; $varall = "$var1. $var2.
You just combined three variables in one!"; echo $varall; ?> Outcome This is....
Php Echo
Learn what the echo can do for you. Includes basic echo and variable p (10) PHP Echo Description The echo() command has one purpose, displaying whatever you put in between the
brackets. Learn to use it to your advantage. Try It Out There is your echo command. For now,
it does nothing. It has no value to display. Outcome This is my text. Now this echo command
has a value to display. Whatever you replace "This is my text." with will be displayed. Alright,
lets move onto the next step. This time, we will include a variable in the echo command.
$var = "This is a variable"; echo "$var. Congratualations, you just parsed a....
Getting An Array Value Of A Dynamic Variable
(9) Ok i can't believe I need help in php but I can't figure this out... If i have an array,
lets say called test, how do i get a certain value from that array when referencing it dynamically
by either a string or another variable? Example: CODE $test=array(1,2,5);
$name="test"; //Doesn't work: echo $$name[0]; /Doesn't
work: echo ${$name}[0]; ....
Passing Values By Get
(16) I have problem I've been doing some programming in php that is something similar to registration
but whenever I want to check something it seems like variables are not passed or that the php
variables are empty I am using get instead of post however I am also considering to switch to post
as I cannot find an error. Anyone had similar experience that he could help me? Thanks in advance.....
Javascript Help
Can't do simple variable functions ¬_¬ (1) Edit: Haha, nevermind....I've had it fixed now /biggrin.gif" style="vertical-align:middle"
emoid=":D" border="0" alt="biggrin.gif" /> an admin/mod can delete this if s/he feels like it
/tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" /> Slide show
So i'm trying to make my own slideshow, see above. I have the pictures showing depending what
"num" equals...Well, the code's here: CODE <script TYPE="text/javascript">
<!-- var num = 1; var pic = "pic.gif"; switch (num) { default&....
Php Form Help!
Parse error T_LNUMBER - expecting T_VARIABLE (3) Hello, I am trying to make an employee application. I was just wondering if anyone knows how to spot
a php code error, when the code directly around the line with the error looks the same. below is
some of my process.php code. I beleive the error is on line 41. QUOTE PHP parse error: PHP
Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in
/home/wwwange/public_html/FORMS/forms/process.php on line 41 Process.php code: CODE
<?php include("global.inc.php"); $errors=0; $error="The foll....
Converting Characters In A Variable To Individual Values In An Array
turning variables into arrays (2) Say I have a variable such as $nav_item and it had to contents Home . IE: CODE
$nav_item = 'Home'; How would I make so that $nav_item was an array and
had the following contents? CODE $nav_item = array ('h', 'o',
'm', 'e'); With the case changing (ie H would become h and U
would become u ) EDIT: Okay found out that I could change the case with
array_change_key_case ($nav_item, CASE_LOWER); ....
<textarea> Tag Is Not Accepting Php Variable
for display, although <Input> tag does accept it (2) I have a single page template which has a Form on it. Logic is to check for a valid Querystring and
place the variables accepted from a form back into the form and re-display this form with error or
acceptance messages. I'm sure everyone here has done this a million times. The Form accepts
data from a user for First name, Last name, email address, and message-body named
'note_wide' then re-displays the values into the Form, but for some reason, I can't get
the value to display into a Textarea. Sample of the php code is as follows: first the good one:....
Variable Definition
(6) I am creating a checkbook balancing program that uses multiple forms. The first form will allow the
user to enter a certain number of deposits, withdrawals, etc. I want to have the ability to have the
user be able to enter more than what this first screen will provide by allowing them to transfer to
another form. I would like to store the data entered for each of these transaction types into a
global variable (to be used throughout the project) array, and produce a total of the dollar amount
of this transaction type to be used in coming up with an ending balance of the a....
Passing Variables Through A Page?
(4) I have a form that people fill out. Depending on what they fill out on that form, they get different
things on the page they're taken to after hitting "submit". Information from both pages goes
into a database. However, I don't want to create a new row until the second page has been
filled out and submitted (taking the user to a third page). Is there any easy way to pass all the
variables from the first page through the second and to the third? I know I can stick it all in
hidden inputs, but I have more than 60 form items to process, and I'd like to not have....
Limiting Usage Of Variable Combination
combination of names no more than twice (1) Ok I have a program which prints out match lists. There are 4 games for 4 match lists will be
printed out. The problem I have is that when I print a match list out once or twice they are all
the same combination of names. I need a combination of names to be able to only be used twice and
not 4 times. I.e. of how it comes out at mo Match list 1 brad VS charlie Match list 2 brad VS
Charlie match list 3 Brad VS Charlie match list 4 brad VS charlie I.e. of how it should be
match list 1 brad VS charlie match list 2 Brad VS helen Match list 3 Brad VS char....
Hosting Credits Php Variable?
Mostly an admin question, maybe mods? (0) If someone could help me out... I'd like to know what variable you guys have the Hosting
Credits number stored in on the boards (or portal, w/e you want to call it) - -Reason I'd
like to the portal homepage into my blog. Henceforth, i'd call upon said variable in my
blog's page in order to post my current hosting credits amount as a updating variable. It could
be interesting if each member's variable is stored differently (or based MySQL) however,
It's still possible. I plan to create a tutorial about such after learning said information. ....
Determining Whether A Phrase Is In A Variable
deciding whether a string is a url (2) I have a input box in a form called "button" and when the user clicks Submit! I want php to
determine whether or not this is a url or just text. All urls have "http://" in them so I have
decided I need a script which can determine whether or not "http://" is in a variable or a string.
The problem with using strings is that I've never needed to use them before (and thus have no
knowledge about them). When I was using asp, I knew there was a function called instr() but I
can't find php's equivalent. Does anybody know? Thanks in advance!....
Setting The Height Of A Tablerow
Its variable so I want to use (4) I have a html page with a table. The next "image" shows the layout:
-------------------------------------------------------------- HEAD CELL
-------------------------------------------------------------- CONTENT | Main content cell LISTING
| CELL... | --------- Now the "Content listing cell" should always reach the bottom (its a grey
cell and the main content is white, so their should be two columns). If the main content cell's
content is long enough so you can scroll down, their is no problem. But when the "Main content
cell"'s content doesn't reaches ....
Variable Scope
(3) Below is my code, which pretty much follows the Ivor Horton book on learning C++. My question is
this: Why does the program return the value of "80" for count3 in the last cout statement? Why
doesn't it return a value of "50", since the cout statement is located in the outer block and so
should reference the value made in the initializiation made near the top of main(). What am I not
understanding here? Thanks. CODE //ex2_06.cpp //demonstrating variable scope
#include<iostream> using namespace std; int count1 = 100; //Global version fo count1 int
m....
Calling A False Variable...
like $count . $val (6) Okay I'm very new to PHP still, although you may recognize me from the threa before, just go
finished finals so now back to PHP! On one page I accept an input which will tell the next page
how many form lines to generate, that part I have worked out, or so I think. Because the number of
forum fields could vary I need to have a number of forum variables, so I used this code: CODE
echo "<td><input name=\"wname" . $appendval . "\"
type=\"text\" id=\"wname" . $appendval . "....
Php Parse Error
Including Variable in post (2) ok this is my config script that runs my site: CODE <? # Set up info for left column on the
top page: # It should begin with html tag <td> and finish with tag </td>
$top_leftcol=" <td width='195' bgcolor='#eeeeee'
valign='top'> <table width='100%' bgcolor='#777799' border=0
cellspacing='0' cellpadding='0'> <tr><td> <font
FACE='ARIAL, HELVETICA' color='#ffffff' size='-1'>
<b>MMORPG Trade Center<....
Stored Or Global Variable?
(1) I've created a form, nothing special, that uses a php script as a form action to input data into
mysql. Nothing special at all about this scenario. One thing I'd like to do is have the php
script redirect the user back to the html page that has the form the user just completed. I
don't want to have to hard code the url into the header function because I use this php script
with a bunch of other pages. Does PHP store the value of this page into some variable that the php
script can use? Thanks. kvarnerexpress....
Time Passing By
(0) sit here watching my life passing by, The experiences and loss brings a tear to my eyes. Some not
all good like I had hoped, I look back and wonder how I coped. It kills me not to see his face, I
try to find him but he leaves no trace. When I say hello, a reply would be nice, But he just stares
so quiet like mice. I feel like I have done something wrong, I don't want to show it I have to
be strong. He seems so shy like there's something hidden, In his heart like I'm forbidden.
All I ask is for him to discover, I have feelings for him, there isn't anot....
Passing The Time With Google Images
Guess-the-Google game (12) Guess-the-Google : The Image Guessing Game http://grant.robinson.name/projects/guess-the-google/
simple, but addictive. /tongue.gif' border='0' style='vertical-align:middle' alt='tongue.gif' />
trust me. i'm trying to be part of the elite top 10 scorer's for the day. if you get to that
list, take a screenshot, and post it here. /biggrin.gif' border='0' style='vertical-align:middle'
alt='biggrin.gif' /> mechanics: 20 images which match one google keyword will appear in each
round. the object of the game is to GUESS the keyword used to generate those ima....
Calling A Variable From A Dynamic List In A Sql Statement
(2) I would be greatful if anyone could help me out, I have been stuck on this for a while. The problem
is that I have a drop down menu which I get the contents of from a database. Then when I press the
get details button I want to use the value selected in my drop down menu and pass it into an SQL
statement to recieve all te relevent info. Everything works if I specify a known variable, but the
problem seems to be passing a variable in which is part of the array. Below is the code for the drop
down menu and the Sql statement i'm trying to execute. drop down menu: ....
Possible To Put An If Statement Inside A Variable?
(2) Ok, so I'm using the include() function on my website. Problem is I'm trying to include a
search engine form into the layout which is stored in a variable, except the form has an if
statement in it and I can't seem to get it working. Here's the code I'm trying to
include... CODE Search: > Just wondering if it is possible for me to put this
form with the if statement into a variable, or if there's another way that I could go about
doing this. Thanks.....
Looking for passing, variable, xsl, passing, variable, xsl
|
*RANDOM STUFF*
*SIMILAR VIDEOS*
Searching Video's for passing, variable, xsl, passing, variable, xsl
*MORE FROM TRAP17.COM*
|
advertisement
|
|