|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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}"/>
|
|
#3
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > xslt escape characters: howto? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|