Hello,
I have a problem regarding XSLT and the transformation of non-english
iso-8859-1 encoded characters like the German "Umlaute" (e.g. ü a double
dotted u). I am using cocoon 2.1-dev, tomcat 4.0.1 with jdk1.3.1.. The
transformation works fine as long as I don't use the <xsl:attribute ...>
element.
================================================================
my xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<root>
:
:
<c color="blue" sourcefile="foo.xml">Integrations�mter</c>
:
:
</root>
================================================================
================================================================
my xsl:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" omit-xml-declaration="yes" encoding="ISO-8859-1"/>
:
:
<xsl:template match='c[@color="blue"]'>
<xsl:element name="a">
<xsl:attribute name="href">
frameset.xsp?filename=<xsl:value-of
select="@sourcefile"/>&searchstring=<xsl:value-of
disable-output-escaping="yes" select="."/>
</xsl:attribute>
<xsl:value-of select="."/>
</xsl:element>
</xsl:template>
:
:
<xsl:stylesheet>
================================================================
================================================================
sitemap.xmap:
<?xml version="1.0"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
:
:
<map:transformers default="xslt">
<map:transformer name="xslt"
src="org.apache.cocoon.transformation.TraxTransformer">
<encoding>ISO-8859-1</encoding>
</map:transformer>
<map:transformer name="xslt-with-parameters"
src="org.apache.cocoon.transformation.TraxTransformer">
<use-request-parameters>true</use-request-parameters>
<encoding>ISO-8859-1</encoding>
</map:transformer>
</map:transformers>
:
:
</map:sitemap>
================================================================
================================================================
output:
<a href="frameset.xsp?filename=foo.xml&searchstring=Integrations%C3%A4mter">
Integrationsämter
</a> .
================================================================
================================================================
desired output:
<a href="frameset.xsp?filename=foo.xml&searchstring=Integrationsämter">
Integrationsämter
</a> .
================================================================
As you can see the output is generated to be passed to an XSP file via
HTTP-GET.
In cocoon 1.8.2 the desired output was generated.
What I have been trying so far:
- using the "disable-output-escaping" attribute in the <xsl: value-of ...>
element -> no success
-setting the encoding in the <xsl:output ...> element -> no success
-setting the encoding in the sitemap <map:transformer ...> -> no success
-spelling the string 'iso-8859-1' in uppercase and lowerscase letters
Is there any possibility generating the desired output using the current
version of cocoon?
Thanks in advance,
Thorsten
--
Thorsten Schmid
NovoCron Technologies
Am Steg 3, 89231 Neu-Ulm
Fon: +49-731-9723757
Fax: +49-731-9723818
Mobil: +49-170-3021585
mailto:[EMAIL PROTECTED]
www.novocron.de
---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>