I have made a perl script witch gets information out of a database,
transfers it into an xml-file file and than I parse this to a html document
using xsl.
The problem is dat the html doc needs a parameter which can be found in the
xml file.
I've done something like
<xsl:variable name="id" select="person_ id"/>
<a href="http://localhost/CGI/detailsselectio n.cgi?ID=$id">< xsl:value-of
select="name"></xsl:value-of><xsl:value-of
select="first_n ame"></xsl:value-of></a>
Of course this doesn't give me the value of the id-variable. But it just
returns $id.
How can I solve this?
Thanks
L 2 2393
On Tue, 23 Nov 2004 12:23:01 +0100, "lievemario "
<li********@hot mail.com> wrote: I have made a perl script witch gets information out of a database, transfers it into an xml-file file and than I parse this to a html document using xsl. The problem is dat the html doc needs a parameter which can be found in the xml file. I've done something like <xsl:variable name="id" select="person_ id"/> <a href="http://localhost/CGI/detailsselectio n.cgi?ID=$id">< xsl:value-of select="name"> </xsl:value-of><xsl:value-of select="first_ name"></xsl:value-of></a>
Of course this doesn't give me the value of the id-variable. But it just returns $id. How can I solve this?
This should work -- instead of putting the $id variable into the href
attribute directly in the <a> tag, make the href into an xsl:attribute,
and then you can do fancier processing of it in the contents of that xsl
element:
<a>
<xsl:attribut e name="href">
<xsl:value-of
select="concat( 'http://localhost/CGI/detailsselectio n.cgi?ID=',$id) "/>
</xsl:attribute>
<xsl:value-of select="name"/> <xsl:value-of select="first_n ame"/>
</a>
(Note also that since your <xsl:value-of> elements selecting the name
and first name don't have any contents, I've normalized them into
self-closing tags, instead of having separate </xsl:value-of> closing
tags.
--
Morris M. Keesan -- ke****@alum.bu. edu
Another question about this:
So now I have passed the id, and I would like to use it in an sql query,
but the combination
my $id = param('id');
and
select .....where id = $id;
gives an error
is there a solution for this?
"lievemario " <li********@hot mail.com> schreef in bericht
news:cn******** **@snic.vub.ac. be... I have made a perl script witch gets information out of a database, transfers it into an xml-file file and than I parse this to a html
document using xsl. The problem is dat the html doc needs a parameter which can be found in
the xml file. I've done something like <xsl:variable name="id" select="person_ id"/> <a
href="http://localhost/CGI/detailsselectio n.cgi?ID=$id">< xsl:value-of select="name"></xsl:value-of><xsl:value-of select="first_n ame"></xsl:value-of></a>
Of course this doesn't give me the value of the id-variable. But it just returns $id. How can I solve this?
Thanks
L
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: JD |
last post by:
I want to pass two parameters to a simple script running on my web server.
The script "parpass.php" looks like this:
<?php
echo "The total number of parameters passed was: $argc \n";
echo "The parameters passed were: ";
foreach (argv as $val) {
echo "$val ";
}
|
by: JD |
last post by:
I posted this earlier and it disappeared from the NewsGroup
I want to pass two parameters to a simple script running on my web server.
The script "parpass.php" looks like this:
<?php
echo "The total number of parameters passed was: $argc \n";
echo "The parameters passed were: ";
foreach (argv as $val) {
|
by: BB |
last post by:
I am calling my C++ function (in a DLL) from a python script as
follows:
_dllcall('add','ll','l',(var1,var2))
This works fine if the 2 parameters accepted by the function are
normal "long" type.
If the function expects a pointer type parameter then the same way of
passing the parameter doesn't work. For example if the C++ function
expects a "long *" and I am calling it as:
|
by: Mike Wimpe |
last post by:
Without creating a form, how do i pass a value to another script?
I would like to pass:
group = "Oranges"
to another script or at least just 'group' and initialize it in the
first script.
script1:
|
by: Pavils Jurjans |
last post by:
Hallo,
I have been programming for restricted environments where Internet Explorer
is a standard, so I haven't stumbled upon this problem until now, when I
need to write a DOM-compatible code.
The question is about best practices for passing parameters to an event
function.
I have, say, the following HTML:
| |
by: domeceo |
last post by:
can anyone tell me why I cannot pass values in a setTimeout function
whenever I use this function it says "menu is undefined" after th
alert.
function imgOff(menu, num) {
if (document.images) {
document.images.src = eval("mt" +menu+ ".src")
}
alert("imgOff_hidemenu");
hideMenu=setTimeout('Hide(menu,num)',500);
|
by: Nathan Sokalski |
last post by:
I am a beginner with AJAX, and have managed to learn how to use it when
passing single parameters, but I want to return more than one value to the
client-side JavaScript function that displays it. My client-side JavaScript
function takes 4 parameters (which are expected to be integers). The idea of
passing a single parameter and parsing it on the client has occurred to me,
but since I am sure I am not the only person who has situations that...
|
by: simon |
last post by:
hi,
I would like to separate my javascript completely from my xhtml. in the
end there should be only
<script type="text/javascript" src="javalib.js"></script>
in the head-tag to my javascript.
Because I want to use some ajax-requests and other javascript-functions
on my xhtml, I need to dynamically add event handlers to any possible
dom-elements. All solutions I found so fare are for specific, pre-known
|
by: oakwoodman |
last post by:
I have a UNIX script that invokes a DB2 UDB .sql script. I need to pass parameters to the .sql script from the .sh. How does one reference the parameters in the .sql script? The .sql script is not a procedure construct.
|
by: luis |
last post by:
I'm using ctypes to call a fortran dll from python. I have no problems
passing integer and double arryas, but I have an error with str arrys.
For example:
.....
StringVector = c_char_p * len(id) # id is a list of strings
Id_dat=StringVector()
for i in range(len(Id)):
....Id_dat=id
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |