SunQuest
           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 November 16th, 2003, 05:35 PM
jboutelle jboutelle is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 4 jboutelle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
xslt escape characters: howto?

So I'm trying to write some xslt to output an html page.
I want to set the value of an input attribute like so
<input type="text" value = <<xslt result goes here>>

How do I do it? When I try to do the bonehead obvious first thing

<xsl:template match="uz:Card">
<input type="text" value="
<xsl:value-of select='uz:CardText/.'></xsl:value-of>
"></input>
</xsl:template>

XMLSpy doesn't consider it well-formed xml, and neither do I.
What I need to know is how do I escape out of the html within the xslt file in order to make the xslt call. Does anyone have any suggestions?

Regards
j

Reply With Quote
  #2  
Old November 19th, 2003, 01:51 PM
teedee teedee is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 42 teedee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
The long way using xsl:attribute:

Code:
<input type="text">
<xsl:attribute name="value">
<xsl:value-of select='uz:CardText'/>
</xsl:attribute>
</input>


The short way using {placeholders}

Code:
<input type="text" value="{uz:CardText}"/>

Reply With Quote
  #3  
Old November 19th, 2003, 11:05 PM
jboutelle jboutelle is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 4 jboutelle User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thanks!

I had sorted out the long way, but left the post up in the hopes of learning something. I did...that short way is much better!
-jb

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > xslt escape characters: howto?


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 6 hosted by Hostway