Page 1 of 1

Embedding xsl in a this possible??

Posted: Tue May 10, 2005 10:25 pm
by betty
Hello everyone,

Sorry in advance for being a bit of a newbie, but I'm just trying to include a bit of data into a url in an xsl stylesheet, and so far my guesswork has only produced the following (which doesn't work)...

Code: Select all

<xsl:attribute name="src">


<xsl:value-of select="geoDataCodes/longitude">


<xsl:value-of select="geoDataCodes/latitude">

I've tried searching everywhere for the answer to this but perhaps I've not been searching under the right terms.

Does anyone out there know the correct way for me to include the latitude and longitude into the above URL?

If the answer's yes then please please please help me out! I'd be extremely grateful!

Yours hopefully,


Correct approach

Posted: Wed May 18, 2005 10:19 am
by Radu
Hello, Betty
I changed the xsl snippet that you provided to the following:

Code: Select all

<xsl:element name="img" >
<xsl:attribute name="src">
<xsl:value-of select="geoDataCodes/longitude"/>
<xsl:value-of select="geoDataCodes/latitude"/>
Notice that instead of <img> you should use <xsl:element name= "img"> as it allows you to set the attribute value of the tag.
Also, all '&' characters are escaped to '&' so that the XML file is valid.

Regards, Radu.