Jump to content

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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...