|
Subject: [xsl] Image Tage Bug From: G Venkata Phanindra <phani_five@xxxxxxxxxxx> Date: Sat, 5 Nov 2005 13:00:27 +0000 (GMT) |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] RSS and/or Atom (0 FLAMES all, iwantto keepanon | Thread | Re: [xsl] Image Tage Bug, andrew welch |
| [xsl] Concordance with XSLT, Jim_Albright | Date | Re: [xsl] Image Tage Bug, andrew welch |
| Month |