Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 25th, 2004, 02:11 PM
Registered User
 
Join Date: Feb 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Complex URLs

This seems to work fine:

<a>
<xsl:attribute name="href">
    ../build/new.aspx?file=<xsl:value-of select="Filename" />
</xsl:attribute>
[ edit ]
</a>

But I am trying to add some more values in the querystring but it always gives me errors, e.g.:

<a>
<xsl:attribute name="href">
    ../build/new.aspx?file=<xsl:value-of select="Filename" />&edit=true
</xsl:attribute>
[ edit ]
</a>

How can this be done? Thanks!

 
Old February 26th, 2004, 08:17 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

just use the entity &amp; in place of the & sign
 
Old February 26th, 2004, 09:17 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

I replied once but my post seems to have got lost in cyberspace along with my odd socks and last years pay rise the boss promised me.
As pgtips said you need to escape the ampersand but in strict HTML ampersand should be escaped in a document when in a url so you should double escape to &amp;amp;. Most browsers let you get away without doing this though.

--

Joe
 
Old June 16th, 2004, 04:17 AM
Authorized User
 
Join Date: Jun 2003
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Kabe
Default

or much cleaner ...

<a href="../build/new.aspx?file={Filename}&amp;edit=true">[ edit ] </a>





Similar Threads
Thread Thread Starter Forum Replies Last Post
Base URLs - FCKeditor retroviz BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 January 9th, 2008 02:23 AM
Automatic URLs bodenzord Forum and Wrox.com Feedback 2 January 4th, 2005 04:19 PM
Relative URLs? groupmatch BOOK: ASP.NET Website Programming Problem-Design-Solution 21 December 16th, 2004 10:53 AM
urls muhammadtahir4000 HTML Code Clinic 1 December 9th, 2004 04:41 AM
Automatic URLs Imar Forum and Wrox.com Feedback 13 June 19th, 2003 03:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.