473,409 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

Error with parameter. Why?

Hello,

Inside my XSL file I have the following:

<xsl:element name="loc">
<xsl:value-of select="$MyParameter" />
<xsl:value-of select="substring(@url, 3)"/>
</xsl:element>

In line <xsl:value-of select="$MyParameter" /I get an error saying:
The value of parameter MyParameter is either not defined or it is out
of scope.

Thanks,
Miguel

Oct 30 '06 #1
4 1337
Where does the matching xsl:parameter declaration appear?

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Oct 30 '06 #2
shapper wrote:
Inside my XSL file I have the following:

<xsl:element name="loc">
<xsl:value-of select="$MyParameter" />
<xsl:value-of select="substring(@url, 3)"/>
</xsl:element>

In line <xsl:value-of select="$MyParameter" /I get an error saying:
The value of parameter MyParameter is either not defined or it is out
of scope.
So where you you have an
<xsl:param name="$MyParameter"/>
and where do you set its value (either from the outside if the param is
global or with an <xsl:with-param name="$MyParameter"
select="XPathexpression"/>)?
--

Martin Honnen
http://JavaScript.FAQTs.com/
Oct 30 '06 #3
Sorry,

I am lost. This is my first XSL file. Inside my XSL file I have
something like this:

<xsl:element name="loc">
<xsl:text>HERE</xsl:text>
<xsl:value-of select="substring(@url, 3)"/>
</xsl:element>

What I want is to be able to change HERE to something else.
For this I tried to add the MyParameter as I described.

I set the parameter value in my VB.NET code on my Asp.Net web site.
I do that when I run a function to transform the XML file using the XSL
file.

Was this what you asked me?

Sorry, but I am just starting with XSL and XML.

Thanks,
Miguel

Martin Honnen wrote:
shapper wrote:
Inside my XSL file I have the following:

<xsl:element name="loc">
<xsl:value-of select="$MyParameter" />
<xsl:value-of select="substring(@url, 3)"/>
</xsl:element>

In line <xsl:value-of select="$MyParameter" /I get an error saying:
The value of parameter MyParameter is either not defined or it is out
of scope.

So where you you have an
<xsl:param name="$MyParameter"/>
and where do you set its value (either from the outside if the param is
global or with an <xsl:with-param name="$MyParameter"
select="XPathexpression"/>)?
--

Martin Honnen
http://JavaScript.FAQTs.com/
Oct 30 '06 #4
shapper wrote:
I set the parameter value in my VB.NET code on my Asp.Net web site.
The parameter's value has to be explicitly passed to your stylesheet
(see the XSLT implementation's documentation for the syntax, since it
varies from processor to processor) and has to be explicitly accepted by
a top-level xsl:param element in the stylesheet.

See the XSLT FAQ's section on variables and parameters, and/or find a
good tutorial.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Oct 31 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Cherrish Vaidiyan | last post by:
sir, The following are the steps that i followed in setting up standby database on Red hat Linux 9. i am using Oracle 9i. i have followed the steps in this site : ...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
1
by: Dotnet Gruven | last post by:
I've posted this in the adonet group, however it was suggested I might have better luck here.... ============================================================= I'm trying to use a typed dataset and...
4
by: Vish | last post by:
Hi all, I am having a build error in one of the overloaded functions in my class. The function takes either a string as a parameter or a type referenced in another dll as a parameter. My class...
0
by: Luqman | last post by:
I have copied the following code from Internet, and copied it to a file named : test.aspx, and copied that file to c:\Inetpub\wwwroot Directory. When I type on my Internet explorer:...
5
by: cranium.2003 | last post by:
hi, Here is my code #include <iostream.h> int main() { cout <<"HI"; return 0; } and using following command to compile a C++ program g++ ex1.cpp -o ex1
0
by: DC | last post by:
The problem I'm using the .NET GridView and FormView objects for the first time and im getting the error "An OleDbParameter with ParameterName '@ID' is not contained by this...
3
by: Trez | last post by:
Hey guys, Am new at using ASP.Net. am having some problems updating my SQL DB. whenever i try i get this Error. Can someone help me? Incorrect syntax near 'nvarchar'. Description: An unhandled...
2
Dormilich
by: Dormilich | last post by:
Hi, I'm testing my classes for a web page and I stumble upon an error I don't have a clue what it means: Error: Fatal error: Can't use method return value in write context in "output.php" on...
6
by: Ahmedhussain | last post by:
Hi there, I m doing work on a gridview and Im getting an error: A potentially dangerous Request.Form value was detected from the client (ctl00$Content$GridView1$ctl03$TextBox1="<span...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...
0
tracyyun
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...
0
agi2029
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,...
0
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.