XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

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:
  #1  
Old May 6th, 2011, 07:54 AM
mitya mitya is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 239 mitya User rank is Sergeant Major (2000 - 5000 Reputation Level)mitya User rank is Sergeant Major (2000 - 5000 Reputation Level)mitya User rank is Sergeant Major (2000 - 5000 Reputation Level)mitya User rank is Sergeant Major (2000 - 5000 Reputation Level)mitya User rank is Sergeant Major (2000 - 5000 Reputation Level)mitya User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 10 h 20 m 44 sec
Reputation Power: 42
How to output quotes?

Hi all

I can't figure out (and I've searched) how to use quotes in XSL within values. For example:

The following outputs a link that, when clicked, does a JS alert. But I need to wrap the contents of the alert in quotes, as it's a string. I've tried escaping ala other languages, i.e. with the backslash, and also using the quote entity &quot. No joy. Where am I going wrong?

Code:
<a><xsl:attribute name='href'><xsl:value-of select="concat('javascript:alert(TOYS:\n\n',count(toys/toy),');')" /></xsl:attribute>details</a>


Thanks in advance for any help

Last edited by mitya : May 6th, 2011 at 09:07 AM.

Reply With Quote
  #2  
Old May 6th, 2011, 08:52 AM
rileyw rileyw is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2011
Location: Abilene, Texas
Posts: 69 rileyw User rank is Corporal (100 - 500 Reputation Level)rileyw User rank is Corporal (100 - 500 Reputation Level)rileyw User rank is Corporal (100 - 500 Reputation Level)rileyw User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 14 h 37 m 42 sec
Reputation Power: 5
Using &quot; does not work for you? Asking since you posted %quot; above. ref

Reply With Quote
  #3  
Old May 6th, 2011, 09:08 AM
mitya mitya is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 239 mitya User rank is Sergeant Major (2000 - 5000 Reputation Level)mitya User rank is Sergeant Major (2000 - 5000 Reputation Level)mitya User rank is Sergeant Major (2000 - 5000 Reputation Level)mitya User rank is Sergeant Major (2000 - 5000 Reputation Level)mitya User rank is Sergeant Major (2000 - 5000 Reputation Level)mitya User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 10 h 20 m 44 sec
Reputation Power: 42
Typo - I'm using &quot

Reply With Quote
  #4  
Old May 6th, 2011, 09:50 AM
rileyw rileyw is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2011
Location: Abilene, Texas
Posts: 69 rileyw User rank is Corporal (100 - 500 Reputation Level)rileyw User rank is Corporal (100 - 500 Reputation Level)rileyw User rank is Corporal (100 - 500 Reputation Level)rileyw User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 14 h 37 m 42 sec
Reputation Power: 5
Try this

Try the following pastebin code: http://pastebin.com/ceC0MbR8

Moved the javascript outside the <xsl:value-of /> to <xsl:text /> elements. I don't know if that breaks your expectation.

Reply With Quote
  #5  
Old May 6th, 2011, 10:42 AM
mitya mitya is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 239 mitya User rank is Sergeant Major (2000 - 5000 Reputation Level)mitya User rank is Sergeant Major (2000 - 5000 Reputation Level)mitya User rank is Sergeant Major (2000 - 5000 Reputation Level)mitya User rank is Sergeant Major (2000 - 5000 Reputation Level)mitya User rank is Sergeant Major (2000 - 5000 Reputation Level)mitya User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 10 h 20 m 44 sec
Reputation Power: 42
Thanks a lot

Reply With Quote
  #6  
Old November 12th, 2011, 02:36 AM
cashloan cashloan is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2011
Posts: 42 cashloan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 51 m 59 sec
Warnings Level: 10
Number of bans: 2
Reputation Power: 2
You have the need and the right to spend part of your life caring for your soul. It is not easy. You have to resist the demands of the work-oriented, often defensive, element in your psyche that measures life only in terms of output -- how much you produce -- not in terms of the quality of your life experiences. To be a soulful person means to go against all the pervasive, prove-yourself values of our culture and instead treasure what is unique and internal and valuable in yourself and your own personal evolution.”

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > How to output quotes?

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap