I'm trying to output valid xhtml 1.0 transitional with xslt -- my question
is when dealing with elements that have self-closing tags such as <img />
and <input />...
I'm getting closing tags on these elements that should have a self-closing
tag like this:
<img src="/images/img.jpg" alt="alt text"></img>
should be:
<img src="/images/img.jpg" alt="alt text" />
Is this something wrong with my xsl? or is this an issue with the
System.Xml.Xsl. Transform method???
here's an example:
<xsl:element name="img">
<xsl:attribut e name="src"><xsl :value-of select="$folder "
/>/ui/img/<xsl:value-of select="Root/Portal/global/company_logo/@src"
/></xsl:attribute>
<xsl:attribut e name="alt"><xsl :value-of
select="Root/Portal/global/company_logo/@alt" /></xsl:attribute>
</xsl:element>
the output result is:
<img src="/test/ui/img/logo.png" alt="Logo Image"></img>
I've tried various settings in the xsl:output as well, here is the current:
<xsl:output method="xml" media-type="text/html" omit-xml-declaration="ye s"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d"
encoding="UTF-8" indent="yes" />
the complete xsl doc is at:
http://clients.humaniz.net/xsl/sitemain.xsl
thanks!!!
mo