473,554 Members | 2,608 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 8723
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:attribut e name="href">
<xsl:text>htt p://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="indexI D"/>&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:attribut e name="href">
<xsl:text>htt p://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}&a mp;action=1">st uff</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:attribut e name="href">

below is the file text

<a>
<xsl:attribut e name="href">
<xsl:text>htt p://testwebi/testlite/admin/remoteMgmt.aspx ?id=</xsl:text>
<xsl:value-of select="indexID "/>
<xsl:text>&acti on=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:attribut e name="href">
<xsl:text>htt p://testwebi/testlite/admin/remoteMgmt.aspx ?id=</xsl:text>
<xsl:value-of select="indexID "/>
<xsl:text>&acti on=1</xsl:text>
</xsl:attribute>
stuff
</a>

Or use an attribute value template

<a
href="http://testwebi/testlite/admin/remoteMgmt.aspx ?id={indexID}&a ction=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:attribut e name="href">
<xsl:text>htt p://testwebi/testlite/admin/remoteMgmt.aspx ?id=</xsl:text>
<xsl:value-of select="indexID "/>
<xsl:text>&acti on=1</xsl:text>
</xsl:attribute>
stuff
</a>

Or use an attribute value template

<a
href="http://testwebi/testlite/admin/remoteMgmt.aspx ?id={indexID}&a ction=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
1452
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 regarding what parameters the XSLT file is expecting. Then my program can retrieve the information from the style sheet and prompt the user for the...
0
3199
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 getting"The 'DataSource' property is set only by the runtime. It cannotbe declared." error code: <?xml version="1.0"?> <xsl:stylesheet...
4
3497
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 string) Help me pls thx in advance Isambella
1
1349
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 way (XSLT): <xsl:apply-templates select="itemid" /> <xsl:template match="itemid"> <xsl:value-of select="itemnames" /> </xsl:template> And I'd like...
1
3819
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 Phone: (909) 549-3419
1
2501
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 table I make the following call. <tr> <th valign="bottom" width="{foo:GetWidth(0)}">Length<br/>(units)</th>
2
2234
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 file? <xsl:if test="Tooltip != ''"> <a> <xsl:attribute name='href'>#</xsl:attribute> <xsl:attribute...
1
4418
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
1301
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
7819
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8055
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7581
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...
0
6170
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5165
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...
0
3589
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2030
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 we have to send another system
1
1149
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
858
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.