xsl-list
[Top] [All Lists]

Re: MSXML / NBSP problem and resolution

2002-11-07 09:27:50


If so, instead of using something like <xsl:output method="html"
version="1.0" encoding="UTF-8" indent="yes"/> in your xsl, try using
something like
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"
omit-xml-declaration="yes"/>
<xsl:template match="*">
        <html>
                <head>
                        <title>Title</title>
                        <meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-type"></meta>
                </head>
                <body>
                        <xsl:apply-templates/>
                </body>
        </html>

Right, just to follow up, using indent="yes", in my testing, sometimes adds whitespace where it will change the browser's rendering of the page (only if the output method="xml", for method="html", does not seem to be a problem). I was wrestling over this yesterday, and basically an html document that has: <img name="foo" src="foo.gif" width="10" height="10"/><img name="bar" src="bar.gif" width="10" height="10"/>

will display differently than:

        <img name="foo" src="foo.gif" width="10" height="10"/>

        <img name="bar" src="bar.gif" width="10" height="10"/>

The whitespace seems to push them apart, and indent="yes" can introduce this 
whitespace.

I realize that this is getting off-topic, so I'll cut it here.
Mike



XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



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