[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Image Tage Bug

Subject: Image Tage Bug
From: G Venkata Phanindra <phani_five@xxxxxxxxxxx>
Date: Sat, 5 Nov 2005 13:00:27 +0000 (GMT)
image tage
Hi..
I am a newbie to XSL and i am trying to convert an xml
file into an HTML ...
I need to add an Image in the HTML,i am defining HTML
image tag

     <img src=" " alt=" " />

No problem with HTML output. but when i submit this to
an XHTML validator its
giving OMIT TAG error as this is converted as

          <img src= " " alt=" ">

 the / is missing how can i handle this.

Code 

<?xml version='1.0' encoding='utf-8' ?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
version="1.0">
<xsl:output method="html" version="1.0"
encoding="UTF-8"/>
<xsl:key name="urlset" match="url" use="group"/>
<xsl:template match="/">
	<xsl:apply-templates/>
</xsl:template>
<xsl:template match="urlset">
   <xsl:for-each
select="//url[generate-id(.)=generate-id(key('urlset',group))]">
    	<h2><xsl:value-of select="group"/></h2>
    	 <div class="alllevels">
			 <xsl:for-each select="key('urlset',group)">
          <div>
    		<xsl:attribute name="class">level<xsl:value-of
select="depth" /></xsl:attribute>
	    	<a>
	    		<xsl:attribute name="href"><xsl:value-of
select="loc" /></xsl:attribute>
	    		<xsl:value-of disable-output-escaping="yes"
select="title" />
	    	</a>
	    </div>
    		</xsl:for-each>
    		</div>
	</xsl:for-each>
</xsl:template>
</xsl:stylesheet>


Thanks for Answers
Phani


G Venkata PhanindraMobile:: 9849852989


		
____________________________________________________
Enjoy this Diwali with Y! India Click here http://in.promos.yahoo.com/fabmall/index.html

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.