Jump to content

Adding an Image using XML

Guest Skye

Recommended Posts

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

Link to comment
Share on other sites

If you had something like this:


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

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