cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: mail
Date Tue, 06 Aug 2002 18:25:41 GMT
The stylesheet would not work, if there is still a needed namespace in 
the document after the i18n transformer. I think especially of the XHTML 
namespace. To fix this change the line

<xsl:element name="{name()}">

to

<xsl:element name="{name()}" namespace="{namespace-uri()}">

Regards,

Joerg

Helena Ginzburg wrote:
> Hello Joerg,
> Thanks a lot. It works great.
> Helena.
> 
> -----Original Message-----
> From: Joerg Heinicke [mailto:joerg.heinicke@gmx.de]
> Sent: Tuesday, August 06, 2002 5:57 PM
> To: cocoon-users@xml.apache.org
> Subject: Re: mail
> 
> 
> Hello Helena,
> 
> your exclude-result-prefixed won't have any effect because the namespace is 
> still needed in the output of the XSLT. The i18n transformer comes after 
> your XSLT and it seems that it does not remove all namespaces correctly. You
> 
> can reach this with another XSLT after the i18n:
> 
> <xsl:template match="*">
>    <xsl:element name="{name()}">
>      <xsl:apply-templates select="@*|node()"/>
>    </xsl:element>
> </xsl:template>
> 
> <xsl:template match="@*">
>    <xsl:attribute name="{name()}">
>      <xsl:value-of select="."/>
>    </xsl:attribute>
> </xsl:template>
> 
> <xsl:template match="comment()|processing-instruction()|text()">
>    <xsl:copy-of select="."/>
> </xsl:template>
> 
> Hope this helps,
> 
> Joerg
> 
> Helena Ginzburg wrote:
> 
>>Hi, All
>>	I'm try to use I18nTransformer. I'm getting namespace prefixes in
>>the wml output from Cocoon 2.03. If I to use
> 
> exclude-result-prefixes="i18n"
> 
>>namespace prefixes removing from wml tag while I have it with
>>i18n:attribute. Can I to remove namespace prefix total?
>>My xsl:
>><xsl:stylesheet  	    version="1.0"
>> 
>>xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>	
>>xmlns:i18n="http://apache.org/cocoon/i18n/2.0"
>>				    exclude-result-prefixes="i18n">
>><xsl:template match="/">
>>	<wml>
>>	<card title="Login" i18n:attr="title">
>> 		<p>	
>>			<b><i18n:text>Login</i18n:text></b><br/>
>>  		</p>
>>	</card>
>>	</wml>
>></xsl:template>
>></xsl:stylesheet>
>>
>>Wml output :
>><?xml version="1.0" encoding="UTF-8"?>
>><wml>
>><card xmlns:i18n="http://apache.org/cocoon/i18n/2.0" title="Please Login">
>><p><b>Please Login</b><br/>
>></card>
>></wml>
>>
>>Any help would be much appreciated.
>>Regards, Helena.
> 
> 



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message