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:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old July 23rd, 2002, 02:21 PM
petrik petrik is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 13 petrik User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question complex URL's in xsl:attribute

I try to create the following using XSL:

Code:
<table onclick"index.php?action=get_record&record=product&id=1">


But I either get an error because of ampersands and equal signs or a lot of < &amp; when I try the following:

Code:
<xsl:element name="table">
  <xsl:attribute name="onclick">
    <xsl:value-of select="PHP_SELF" />?<![CDATA 
     [action=get_record&record=product&id=]]><xsl:value-of select="ID" /></xsl:attribute>


Does anyone know a good solution?

Reply With Quote
  #2  
Old July 28th, 2002, 02:03 AM
jough jough is offline
El Guapo
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: You have moved into a dark place. It is pitch black. You are likely to be eaten by a grue.
Posts: 56 jough User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 7 m 47 sec
Reputation Power: 7
First of all, your source:

Code:
<table onclick"index.php?action=get_record&record=product&id=1">


Will generate errors in any decent XML parser - you can't have unadorned ampersands in your XML files - this line should read:

Code:
<table onclick"index.php?action=get_record&amp;record=product&amp;id=1">


You'll also need to replace the & with the entitity replacement value in your XSLT. Don't worry, the browser will be able to read it.

Don't forget the closing tag to </xsl:element> too.

-- Jough
__________________
See my PHP in action:
Poetry Archives

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > complex URL's in xsl:attribute


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