Jump to content

XSLT Problems


nicefella

Recommended Posts

Hi, I am a beginner in xml.I need to include a picture in my xslt page which is linked to my xml page, so when the xml page is viewed, the picture shows.But I cant seem to get the syntax right.Can anyone help please?

Link to comment
Share on other sites

Well show us your XML input format.Assuming you have e.g.

<root>  <images>	 <image>img1.gif</image>	 <image>img2.gif</image>  </images></root>

in your XML you can then transform to HTML with e.g.

<xsl:template match="images">  <ul>	<xsl:apply-templates/>  </ul></xsl:template> <xsl:template match="image">  <li>	<img src="{.}"/>  </li></xsl:template> 

Edited by Martin Honnen
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...