Hello Michael,
Sunday, February 11, 2001, 4:05:42 PM, you wrote:
MB> Can you show us a sample of your source and the XSLT template that
MB> produces this output?
MB> Michael
MB> ------------------------------------------
MB> Michael Beddow
MB> http://www.mbeddow.net/
Yes, hereby I put examples and repeat the question.
Hello, All!
Can anybody help me (but I think this is not Sablotron specific question) with
such problem: I have to get clean html code from xml/xslt without any
space characters like tabulation, space and CR/LF. My target html code
have to include such sequence:
------------------------------
<td><img src="smth1.gif"><img src="smth2.gif"><img src="smth3.gif"></td>
------------------------------
but I get (and in that case I get spoiled layout in the browser):
------------------------------
<td>
<img src="smth1.gif">
<img src="smth2.gif">
<img src="smth3.gif">
</td>
------------------------------
I tried to turn "indent" to "no" position in XSL and ommit all space
chracters in the one but the result is the same.
Examples is attached with e-mail.
--
Best regards,
Alexey
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="1.0" omit-xml-declaration="yes" indent="no" media-type="text/html"/>
<xsl:template match="/">
<html>
<body>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<xsl:apply-templates select="/page/adver"/>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="banner">
<xsl:for-each select=".">
<img border="0">
<xsl:attribute name="src"><xsl:value-of select="@src"/></xsl:attribute>
<xsl:attribute name="width"><xsl:value-of select="../@width"/></xsl:attribute>
<xsl:attribute name="height"><xsl:value-of select="../@height"/></xsl:attribute>
<xsl:attribute name="alt"><xsl:value-of select="@alt"/></xsl:attribute>
</img>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
test.xml