cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew M <and...@jibeya.com>
Subject Re: Problem with xmlns in html output (problem is whitespace)
Date Fri, 26 Nov 2004 12:24:13 GMT
Ok,
I have ascertained that the problem I am having is whitespace, so I 
have amended my xsl file as so:

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declarations="yes" />
<xsl:strip-space elements="*"/>

..........

<xsl:template match="@*|node()">
         <xsl:copy>
			<xsl:apply-templates select="@*|node()"/>
         </xsl:copy>
</xsl:template>

<xsl:template match="@*|text()">
	  <xsl:copy/>
</xsl:template>

but the white space is still there. How can I amend the code to remove 
all whitespace in the final output?

thanks

Andrew
On 26 Nov 2004, at 10:25, Andrew M wrote:

> Hi,
> I have a series of xsl templates which begin with:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> 	<xsl:stylesheet version="1.0" 
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> 		<xsl:template match="/">
> 			<test>
> 				<html>
>
> The test tag is placed before the html tag because, even though no 
> xmlns code can be viewed in the html output:,
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> 	<!DOCTYPE test PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> 		<test>
> 			<html>
> 				<head>
>
> I suspect xmlns data is being written to the very first tag after the 
> xsl:template tag. Without a tag placed before the html tag, javascript 
> fails to work properly in browsers on the Macintosh. Has anybody 
> experienced this, is there a solution to this problem?
>
> regards
>
>
> Andrew
>

Mime
View raw message