Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Putting xsl into html? 1

Status
Not open for further replies.

Delameko

Programmer
Oct 14, 2003
37
GB
Back again (I'm sure you're getting sick of my, Jonty [wink])

Is there anyway to put xsl into a html tag?

In my xsl file I have a link to an image file:
<img src="?Image?.jpg" />

As there are no links to images in the XML I want to use an ID <venue venueID="?Image?">

JontyMC set me up in a previous thread with making venueID dynamic. This way I can have a different image each time its called.

I tried putting the XSL I know directly into the img tag but it made the XSL invalid.

Thanks in advance.
 
Just to be clear. If the XSL is only showing records with the ID of aa01, then I would have an image called aa01.jpg etc that would be available for it to show.
 
You can use curly brackets to denote an xpath expression:
Code:
<img src="{$venueID}.jpg"/>

Jon

"I don't regret this, but I both rue and lament it.
 
Ah, of course. I've seen this before, but didn't have an opportunity to put it into practice at the time.

Thanks again, Jonty, I feel my XML/XSL has improved ten fold.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top