XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old February 13th, 2002, 05:28 AM
alexgreg's Avatar
alexgreg alexgreg is offline
Full Access
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jun 2000
Location: London, UK
Posts: 2,019 alexgreg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 sec
Reputation Power: 11
Rendering XSLT output into an URL

Hi,

I'm having problems trying to render XSL output into a URL. It seems the problems lie with the characters & and =.

This XSL code renders fine:

Code:
<xsl:template match="stuff">

<a href="stuff/q2_{@set}.htm?qset\={@qset}qcode-{@qcode}">hello</a>

</xsl:template>


This, however, does not:

Code:
<xsl:template match="stuff">

<a href="stuff/q2_{@set}.htm?qset={@qset}&qcode={@qcode}">hello</a>

</xsl:template>


I get an error complaining about the XSL not being well-formed. I need to use the ampersand and equals characters in order to build my URL correctly. How can I use these characters without causing an error?
__________________
Alex
(http://www.alex-greg.com)

Reply With Quote
  #2  
Old February 13th, 2002, 06:38 AM
Taradino Taradino is offline
Python Prophet
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Amersfoort, The Netherlands
Posts: 45 Taradino User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
You can't just use special characters like the ampersand(&), but you have to replace them with (for example):
Code:
&

( I had to place it between [code] tags, because vB parsed it too.

Character Data and Markup
__________________
Some people, when confronted with a problem, think “I know, I'll use regular expressions.” Now they have two problems. - Jamie Zawinski, in comp.lang.emacs

Reply With Quote
  #3  
Old March 15th, 2002, 09:23 AM
Yaa 101 Yaa 101 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: yes
Posts: 30 Yaa 101 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Smile

__________________
The Knowledge Emporium

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Rendering XSLT output into an URL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway