You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andrew M <an...@jibeya.com> on 2004/11/26 13:24:13 UTC
Re: Problem with xmlns in html output (problem is whitespace)
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
>
Re: Problem with xmlns in html output (problem is whitespace)
Posted by Andrew M <an...@jibeya.com>.
Ah.... sorted!
On 26 Nov 2004, at 12:24, Andrew M wrote:
> 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
>>
> <beya-email.gif>
> +The home of urban music
> + http://www.beyarecords.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org