I am trying to insert a background image and have it so that it does not repeat itself and the image is centered. Here is the XSL coding i have used:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/countries">
<html>
<body background ="bg_locale.jpg">
<font color="white">
<xsl:for-each select="country">
<xsl:value-of select="countryname"/><br/>
</xsl:for-each>
</font>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
It looks like you are writing HTML within your XSL template. There are many ways to accomplish what you are trying to do, here is the simplest:
Instead of using the HTML “background” element, you may try using the “style” attribute. Eventually, you will want to have this style information separated from the content, but I imagine that this is coming later in the course 🙂 The style attribute accepts a syntax called CSS (Cascading Style Sheets). Without getting too deep into it, try something along these lines:
You can find more information about CSS backgrounds here: http://www.w3schools.com/css/css_background.asp