473,499 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

passing url in xslt file

I just want to pass the below URL in my xslt file.

<a href="http://testwebi/testlite/admin/remoteMgmt.aspx?id=<xsl:value-of
select="indexID"/>&action=1">

i keep geeting errors whn i am trying to pass this url, but if i change the
url to below url

<a href="http://testwebi/testlite/admin/remoteMgmt.aspx?id=12/>&action=1">

then it works fine. I just need to pass the database value to the url. The
datbase value will come in <xsl:value-of select="indexID"/>.

Please let me know if it is possible.

Thanks.
--
vinki
Jan 25 '07 #1
4 8717
vinki wrote:
I just want to pass the below URL in my xslt file.

<a href="http://testwebi/testlite/admin/remoteMgmt.aspx?id=<xsl:value-of
select="indexID"/>&action=1">
XSLT is XML, so it must be well-formed. You can't put "<" in an
attribute value in XML; and the "&" must be given as "&amp;"

<a>
<xsl:attribute name="href">
<xsl:text>http://testwebi/testlite/admin/remoteMgmt.aspx?id=</xsl:text>
<xsl:value-of select="indexID"/>
<xsl:text>&amp;action=1</xsl:text>
</xsl:attribute>
stuff
</a>

///Peter
--
XML FAQ: http://xml.silmaril.ie/

Jan 25 '07 #2
Peter Flynn wrote:
vinki wrote:
>I just want to pass the below URL in my xslt file.
<a
href="http://testwebi/testlite/admin/remoteMgmt.aspx?id=<xsl:value-of
select="indexID"/>&action=1">

XSLT is XML, so it must be well-formed. You can't put "<" in an
attribute value in XML; and the "&" must be given as "&amp;"

<a>
<xsl:attribute name="href">
<xsl:text>http://testwebi/testlite/admin/remoteMgmt.aspx?id=</xsl:text>
<xsl:value-of select="indexID"/>
<xsl:text>&amp;action=1</xsl:text>
</xsl:attribute>
stuff
</a>
Or use an attribute value template

<a
href="http://testwebi/testlite/admin/remoteMgmt.aspx?id={indexID}&amp;action=1">stuff</a>

///Peter
Jan 25 '07 #3
Hello Peter,

I am a newbie in xslt files. I just took your peice of code and save that
file as test.xsl and tried to display it in the browser. I got this error

Reference to undeclared namespace prefix: 'xsl'. Error processing resource
'file:///C:/Documents and Settings/U311770/Deskt...

<xsl:attribute name="href">

below is the file text

<a>
<xsl:attribute name="href">
<xsl:text>http://testwebi/testlite/admin/remoteMgmt.aspx?id=</xsl:text>
<xsl:value-of select="indexID"/>
<xsl:text>&action=1</xsl:text>
</xsl:attribute>

</a>

am I doing something wrong.

Thanks.
--
vinki
"Peter Flynn" wrote:
Peter Flynn wrote:
vinki wrote:
I just want to pass the below URL in my xslt file.
<a
href="http://testwebi/testlite/admin/remoteMgmt.aspx?id=<xsl:value-of
select="indexID"/>&action=1">
XSLT is XML, so it must be well-formed. You can't put "<" in an
attribute value in XML; and the "&" must be given as "&"

<a>
<xsl:attribute name="href">
<xsl:text>http://testwebi/testlite/admin/remoteMgmt.aspx?id=</xsl:text>
<xsl:value-of select="indexID"/>
<xsl:text>&action=1</xsl:text>
</xsl:attribute>
stuff
</a>

Or use an attribute value template

<a
href="http://testwebi/testlite/admin/remoteMgmt.aspx?id={indexID}&action=1">stuff</a>

///Peter
Jan 25 '07 #4
Thanks Peter, It worked!!.

Thanks again
--
vinki
"Peter Flynn" wrote:
Peter Flynn wrote:
vinki wrote:
I just want to pass the below URL in my xslt file.
<a
href="http://testwebi/testlite/admin/remoteMgmt.aspx?id=<xsl:value-of
select="indexID"/>&action=1">
XSLT is XML, so it must be well-formed. You can't put "<" in an
attribute value in XML; and the "&" must be given as "&"

<a>
<xsl:attribute name="href">
<xsl:text>http://testwebi/testlite/admin/remoteMgmt.aspx?id=</xsl:text>
<xsl:value-of select="indexID"/>
<xsl:text>&action=1</xsl:text>
</xsl:attribute>
stuff
</a>

Or use an attribute value template

<a
href="http://testwebi/testlite/admin/remoteMgmt.aspx?id={indexID}&action=1">stuff</a>

///Peter
Jan 26 '07 #5

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

Similar topics

2
1448
by: Richard L Rosenheim | last post by:
Is it possible to include addition tags in a XSLT file, that the XSLT processor will, for all practical purposes, ignore? What I'm looking to do is to include a section to contain information...
0
3194
by: Ganesh Kolappan via .NET 247 | last post by:
Hi I am trying to populate a <asp:dropdownlist> in a XSLT file withdatasource pointing to a C# codebehind file method which returnsa dataview. I am using XSLT extension object. But I am...
4
3489
by: Isambella via DotNetMonster.com | last post by:
Hi, I have in a string some XML and I want that xml to be transformed using XSLT file (I found the way how to transform a xml file using XSLT but I didn’t find a way how to transform using...
1
1337
by: Max Evans | last post by:
I have a XML file, which contains itemid-elements, e.g.: <itemid>3</itemid> <itemid>12</itemid> Now I want to convert these IDs to the corresponding name via XSLT. I thought I could do it this...
1
3805
by: vinki | last post by:
Hi Everyone, I have this xslt file. I want to print the page directly to the printer after every MOP template is matched. So for example the ouput is coming to the HTML page like this ...
1
2492
by: Shrek | last post by:
My xslt file contains a passed parameters <xsl;param name="Widths">70px,70px,70px,100px,100px</xsl;param> which I want to use to sets the widths of my table columns . when I create my...
2
2231
by: ismailc | last post by:
Hi, I need help please! My tooltip works fine but the moment one reload the page which is set on some objects then the tooltip does not work! How can i bypas this or make it reload the xslt...
1
4413
by: suratna | last post by:
i have an xslt file. i have no problem writing html code inside it but when i write a mysql select query inside it, it gives error. Is there any way to write php code inside xslt file? ratna
1
1297
by: stephen1313 | last post by:
I have a big XML file and I need an XSLT file to output to HTML. Is there an inference tool that will do that? If not, is any one interested in helping a newbie create an XSLT file? Thanks
0
7014
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...
1
6905
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...
0
7395
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
4609
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...
0
3108
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3103
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
311
bsmnconsultancy
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...

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.