nicefella Posted June 21, 2013 Share Posted June 21, 2013 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 More sharing options...
Martin Honnen Posted June 22, 2013 Share Posted June 22, 2013 (edited) 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 June 22, 2013 by Martin Honnen Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now