xsl-list
[Top] [All Lists]

Image Tage Bug

2005-11-05 06:00:27
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>