If the i18n transformer is the last transformer in the pipe, it has nothing to do with copying elements to the output. It is not Hans' fault, but probably Mr I18n Konstantin's ;-) On the other hand the Nokia's logic is very poor, because it is not correctly namespace aware.

What you can do? Add a transformer after the i18n, that does not copy the elements to the output (because this would copy every namespace node too), but creates every element new:

<xsl:template match="*">
  <xsl:element name="{name()}">
    <xsl:apply-templates select="@* | node()"/>
  </xsl:element>
</xsl:template>

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

If I didn't forget anything, it should work :-)

Regards,

Joerg

Marco Rolappe wrote:
hi hans,

I had this problem too. it maybe a default template in your stylesheet(s)
which is applied to all elements not explicitly matched in your
stylesheet(s). this one probably copies all nodes over including namespace
nodes.

I don't really have a solution, since I also had another issue, which is a
rather strange one; I changed the position of the i18n transform within the
pipeline and the namespace declarations went away.

see following example resource, which works. the actual transformation to
wml (from custom markup) is done via the xslt transform with amore2wml.xsl.

...
        <map:resource name="wml-content">
            <map:generate type="file" src="{source}"/>

            <map:transform type="xslt"
src="context://stylesheets/layout.xsl"/>

<map:transform type="cinclude"/>

<map:transform type="xslt" src="stylesheets/{app-conf}.xsl"/>

            <map:transform type="xslt"
src="context://stylesheets/macros.xsl">
                <map:parameter name="app-conf" value="{app-conf}"/>
                <map:parameter name="resource-name"
value="{resource-name}"/>
            </map:transform>

            <map:act type="get-user-agent">
                <map:transform type="xslt"
src="context://stylesheets/adapt.xsl">
                    <map:parameter name="user-agent" value="{1}"/>
                </map:transform>
            </map:act>

            <map:transform type="i18n">
                <map:parameter name="locale" value="de"/>
            </map:transform>

            <map:transform type="xslt"
src="context://stylesheets/amore2wml.xsl"/>

<map:transform type="handset-cache-sux"/>

            <map:transform type="encodeURL">
                <map:parameter name="include-name"
value=".*/@href|.*/@action"/>
            </map:transform>

            <map:serialize type="wml"/>
        </map:resource>
...


-----Ursprungliche Nachricht-----
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Auftrag von Dr. Hans M. Rupp
Gesendet: Mittwoch, 5. Marz 2003 13:22
An: Coocon-user Liste
Betreff: i18n namespace attribute in wml output


Hallo!


We trying to use Cocoon with the i18n Transformer to generate wml
output. We have noticed that the generated wml code contains an i18n
namespace attribute.
This causes the Nokia Wap toolkit not to recognize the output as wml.
How can we configure the i18n Transformer so that no namespace attribute
is inserted into the output?

Many thanks,

Hans


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to