Jump to content
Sign in to follow this  
Guest Skye

Adding an Image using XML

Recommended Posts

Guest Skye

Here is my xml:

<?xml version="1.0" encoding="ISO-8859-1"?><AB_GRAPHICLEFT>	<PAGE>  <MAIN_TITLE>Empire Burlesque</MAIN_TITLE>  <CONTENT>This is where the main content text would go if we were programming this.</CONTENT>  <LEFT_GRAPHIC>Graphic</LEFT_GRAPHIC>  <RIGHT_GRAPHIC></RIGHT_GRAPHIC>  <NAVIGATION_TEXT>Next to Continue.</NAVIGATION_TEXT>	</PAGE></AB_GRAPHICLEFT>

In place of Graphic within <LEFT_GRAPHIC>Graphic</LEFT_GRAPHIC>, I would like to call the actual image src. How do I best do this?Thanks in advance!Skye

Share this post


Link to post
Share on other sites

If you had something like this:

  <LEFT_GRAPHIC>http://example.com/image.jpg</LEFT_GRAPHIC>

I believe you could then apply this template in xsl when transforming to xhtml.

<xsl-template match="LEFT_GRAPHIC"><img><xsl:attribute name="src"><xsl:value-of select="." /></xsl:attribute></img></xsl-template>

It can also be done like I posted in this topic:http://w3schools.invisionzone.com/index.ph...st=0entry1227

Share this post


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.

Guest
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.

Loading...
Sign in to follow this  

×
×
  • Create New...