You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Janning Vygen <vy...@planwerk6.de> on 2001/04/20 17:08:37 UTC

XalanC and german umlaute

Please help, i am totally confused:

im using XalanC on a linux box. everything runs very well, but not 
transforming a file with german umlaut like ä. maybe you dont see them in 
this mail, but they are in this file.

this is my xml file

<?xml version="1.0" encoding="iso-8859-1"?>
<book id="simple">
  <title>Testbook</title>
  <author>Planwerk 6</author>
  <chapter>
      <title>Umlaute</title> 
      <para>deutsche Umlaute: ä ü </para>     
  </chapter>
</book>

and i use a simple xsl file like this (just a one to one copy):

<?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="xml" encoding="iso-8859-1"/>
<xsl:template match="/">
   <xsl:copy-of select="*"/>
</xsl:template>
</xsl:stylesheet>

It just didnt work, even if i substitute the umlaute to entities like &uuml; 
and define the in the dtd like <!ENTITY uuml "ü">

so i tried to install icu1.6 like it was described in the doku of xalanC

i call xalan from a bash script like this:

--------
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../xml-xalan/c/lib 
ICU_DATA=/usr/local/share/icu/1.6/
IN=../xml/testbook.xml
XSL=../xsl/simple.xsl
OUT=../html/simple.html
xml-xalan/c/bin/testXSLT -IN $IN -XSL $XSL -OUT $OUT -HTML -TT -TG
--------

OUTPUT FROM XalanC:

========= Parsing ../xsl/master2complete.xsl ==========
Parse of ../xsl/master2complete.xsl took 10 milliseconds
========= Parsing ../xml/testbook.xml ==========
Parse of ../xml/testbook.xml took 20 milliseconds
=============================
Transforming...
Line #7, Column #25: xsl:template match="/"
STARTDOCUMENT
STARTELEMENT: book
IGNORABLEWHITESPACE
STARTELEMENT: title
CHARACTERS: Testbook
ENDELEMENT:
IGNORABLEWHITESPACE
STARTELEMENT: author
CHARACTERS: Planwerk 6
ENDELEMENT:
IGNORABLEWHITESPACE
STARTELEMENT: chapter
IGNORABLEWHITESPACE
STARTELEMENT: title
CHARACTERS: Umlaute
ENDELEMENT:
IGNORABLEWHITESPACE
STARTELEMENT: para
CHARACTERS:
XSLException Type is : TranscodingException
Message is : An error occurred while transcoding! 
-----------------

I Hope, i gave anyone enough information to help me out of my trouble. I lost 
two days with this kind of problem and i would like to get some fun again. 

Maybe i am just confused, maybe xalanC doesnt support german umlaute. 

greetings
janning

from the xerxec doku:
Xerces-C has intrinsic support for ASCII, UTF-8, UTF-16 (Big/Small Endian), 
UCS4(Big/Small Endian), EBCDIC code pages IBM037 and IBM1140 encodings,
ISO-8859-1 (aka Latin1) and Windows-1252. This means that it can parse input
XML files in these above mentioned encodings.

so i dont know if it was important to install icu1.6???? as i said: i am 
confused.

-- 
Planwerk 6 /websolutions
Herzogstraße 86
40215 Düsseldorf

fon 0211-6015919
fax 0211-6015917
http://www.planwerk6.de

RE: XalanC and german umlaute

Posted by Christian Aberger <xm...@Aberger.at>.
Hi,

I also use Xalan, and it works fine with Umlaute. But you must UTF-8 encode
them in the stylesheet.
Sample:
      <para>deutsche Umlaute: &#220; &#252; </para>

wfR ChrisA
-----Original Message-----
From: Janning Vygen [mailto:vygen@planwerk6.de]
Sent: Freitag, 20. April 2001 17:09
To: xalan-dev@xml.apache.org
Subject: XalanC and german umlaute


Please help, i am totally confused:

im using XalanC on a linux box. everything runs very well, but not
transforming a file with german umlaut like ä. maybe you dont see them in
this mail, but they are in this file.

this is my xml file

<?xml version="1.0" encoding="iso-8859-1"?>
<book id="simple">
  <title>Testbook</title>
  <author>Planwerk 6</author>
  <chapter>
      <title>Umlaute</title>
      <para>deutsche Umlaute: ä ü </para>
  </chapter>
</book>

and i use a simple xsl file like this (just a one to one copy):

<?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="xml" encoding="iso-8859-1"/>
<xsl:template match="/">
   <xsl:copy-of select="*"/>
</xsl:template>
</xsl:stylesheet>

It just didnt work, even if i substitute the umlaute to entities like &uuml;
and define the in the dtd like <!ENTITY uuml "ü">

so i tried to install icu1.6 like it was described in the doku of xalanC

i call xalan from a bash script like this:

--------
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../xml-xalan/c/lib
ICU_DATA=/usr/local/share/icu/1.6/
IN=../xml/testbook.xml
XSL=../xsl/simple.xsl
OUT=../html/simple.html
xml-xalan/c/bin/testXSLT -IN $IN -XSL $XSL -OUT $OUT -HTML -TT -TG
--------

OUTPUT FROM XalanC:

========= Parsing ../xsl/master2complete.xsl ==========
Parse of ../xsl/master2complete.xsl took 10 milliseconds
========= Parsing ../xml/testbook.xml ==========
Parse of ../xml/testbook.xml took 20 milliseconds
=============================
Transforming...
Line #7, Column #25: xsl:template match="/"
STARTDOCUMENT
STARTELEMENT: book
IGNORABLEWHITESPACE
STARTELEMENT: title
CHARACTERS: Testbook
ENDELEMENT:
IGNORABLEWHITESPACE
STARTELEMENT: author
CHARACTERS: Planwerk 6
ENDELEMENT:
IGNORABLEWHITESPACE
STARTELEMENT: chapter
IGNORABLEWHITESPACE
STARTELEMENT: title
CHARACTERS: Umlaute
ENDELEMENT:
IGNORABLEWHITESPACE
STARTELEMENT: para
CHARACTERS:
XSLException Type is : TranscodingException
Message is : An error occurred while transcoding!
-----------------

I Hope, i gave anyone enough information to help me out of my trouble. I
lost
two days with this kind of problem and i would like to get some fun again.

Maybe i am just confused, maybe xalanC doesnt support german umlaute.

greetings
janning

from the xerxec doku:
Xerces-C has intrinsic support for ASCII, UTF-8, UTF-16 (Big/Small Endian),
UCS4(Big/Small Endian), EBCDIC code pages IBM037 and IBM1140 encodings,
ISO-8859-1 (aka Latin1) and Windows-1252. This means that it can parse input
XML files in these above mentioned encodings.

so i dont know if it was important to install icu1.6???? as i said: i am
confused.

--
Planwerk 6 /websolutions
Herzogstraße 86
40215 Düsseldorf

fon 0211-6015919
fax 0211-6015917
http://www.planwerk6.de


Re: XalanC and german umlaute

Posted by Juergen Hermann <jh...@web.de>.
On Fri, 20 Apr 2001 17:08:37 +0200, Janning Vygen wrote:

>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../xml-xalan/c/lib 
export LANG=de_DE
>ICU_DATA=/usr/local/share/icu/1.6/
>IN=../xml/testbook.xml
>XSL=../xsl/simple.xsl
>OUT=../html/simple.html
>xml-xalan/c/bin/testXSLT -IN $IN -XSL $XSL -OUT $OUT -HTML -TT -TG