You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Robert Sösemann <ro...@gmx.de> on 2002/11/16 17:01:13 UTC
correct use of umlauts
Hello, who can help,
I have the following code fragment in my xsp page, but I always get an error
because of the use of german umlaut entities like Ö.
<xsp:logic>
String keyword = <esql:get-string
column="k.word"/>;
String firstletter = keyword.substring(0,6);
String sortable = keyword;
if( firstletter == "Ö" ||
firstletter == "ö"
|| firstletter == "Ä" ||
firstletter == "ä"
|| firstletter == "Ü" ||
firstletter == "ü") {
firstletter =
firstletter.substring(1,1).toUpperCase();
sortable = firstletter + "e" +
keyword.substring(1);
}
</xsp:logic>
That's how I get it from my database. How can I escape this?
I also experience that cocoon has a problem to resolve &... entites in
general. I allways get the error "The entity * was referenced, but not
declared.
What is wrong?
Robert
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: correct use of umlauts
Posted by Joerg Heinicke <jo...@gmx.de>.
Last question should mean: *How* do they get in it?
Joerg
Joerg Heinicke wrote:
> I would try to solve the problem at another point: The escaped entities
> should not be stored in the database. Are you sure they are in it? And
> do they get in it?
>
> Joerg
>
> Robert Sösemann wrote:
>
>> I use MYSQL and I guess when I extract an attributes content, Cocoons
>> ESQL
>> converts german umlauts into escaped entities.
>> I have this problem while generating a site keyword index.
>>
>> I extract all keywords from my articles in the db, and then sort them
>> alphabetically. But the Problem is that I don't get the Umlauts sorted
>> correctly. What I mean is that the german O Umlaut which should be listed
>> with the normal "O" words appears after "Z".
>>
>> Thats why I want to filter those special characters with an XSP and
>> tell the
>> following XSL to sort an umlaut O like "Oe".
>>
>> But that doesn't work.
>>
>>
>> ----- Original Message -----
>> From: "Joerg Heinicke" <jo...@gmx.de>
>> To: <co...@xml.apache.org>
>> Sent: Sunday, November 17, 2002 1:49 AM
>> Subject: Re: correct use of umlauts
>>
>>
>>
>>> Hello Robert,
>>>
>>> you are coding XML and not HTML. The German umlauts are only declared in
>>> HTML as entities. In XML only <, >, ', " and &..; (which
>>> one was the 5th) are known?
>>>
>>> Why do you have Ö in your database? This would be really bad: a
>>> database should store a character in it, not an "entity, which will be
>>> later interpreted as a character".
>>>
>>> Joerg
>>>
>>> Robert Sösemann wrote:
>>>
>>>> Hello, who can help,
>>>>
>>>>
>>>> I have the following code fragment in my xsp page, but I always get an
>>>
>>>
>> error
>>
>>>> because of the use of german umlaut entities like Ö.
>>>>
>>>> <xsp:logic>
>>>> String keyword = <esql:get-string
>>>> column="k.word"/>;
>>>> String firstletter =
>>>
>>>
>> keyword.substring(0,6);
>>
>>>> String sortable = keyword;
>>>>
>>>>
>>>> if( firstletter == "Ö" ||
>>>> firstletter == "ö"
>>>> || firstletter == "Ä" ||
>>>> firstletter == "ä"
>>>> || firstletter == "Ü" ||
>>>> firstletter == "ü") {
>>>> firstletter =
>>>> firstletter.substring(1,1).toUpperCase();
>>>> sortable = firstletter + "e" +
>>>> keyword.substring(1);
>>>> }
>>>> </xsp:logic>
>>>>
>>>> That's how I get it from my database. How can I escape this?
>>>> I also experience that cocoon has a problem to resolve &... entites in
>>>> general. I allways get the error "The entity * was referenced, but not
>>>> declared.
>>>>
>>>> What is wrong?
>>>>
>>>> Robert
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: correct use of umlauts
Posted by Joerg Heinicke <jo...@gmx.de>.
I would try to solve the problem at another point: The escaped entities
should not be stored in the database. Are you sure they are in it? And
do they get in it?
Joerg
Robert Sösemann wrote:
> I use MYSQL and I guess when I extract an attributes content, Cocoons ESQL
> converts german umlauts into escaped entities.
> I have this problem while generating a site keyword index.
>
> I extract all keywords from my articles in the db, and then sort them
> alphabetically. But the Problem is that I don't get the Umlauts sorted
> correctly. What I mean is that the german O Umlaut which should be listed
> with the normal "O" words appears after "Z".
>
> Thats why I want to filter those special characters with an XSP and tell the
> following XSL to sort an umlaut O like "Oe".
>
> But that doesn't work.
>
>
> ----- Original Message -----
> From: "Joerg Heinicke" <jo...@gmx.de>
> To: <co...@xml.apache.org>
> Sent: Sunday, November 17, 2002 1:49 AM
> Subject: Re: correct use of umlauts
>
>
>
>>Hello Robert,
>>
>>you are coding XML and not HTML. The German umlauts are only declared in
>>HTML as entities. In XML only <, >, ', " and &..; (which
>>one was the 5th) are known?
>>
>>Why do you have Ö in your database? This would be really bad: a
>>database should store a character in it, not an "entity, which will be
>>later interpreted as a character".
>>
>>Joerg
>>
>>Robert Sösemann wrote:
>>
>>>Hello, who can help,
>>>
>>>
>>>I have the following code fragment in my xsp page, but I always get an
>>
> error
>
>>>because of the use of german umlaut entities like Ö.
>>>
>>> <xsp:logic>
>>> String keyword = <esql:get-string
>>>column="k.word"/>;
>>> String firstletter =
>>
> keyword.substring(0,6);
>
>>> String sortable = keyword;
>>>
>>>
>>> if( firstletter == "Ö" ||
>>>firstletter == "ö"
>>> || firstletter == "Ä" ||
>>>firstletter == "ä"
>>> || firstletter == "Ü" ||
>>>firstletter == "ü") {
>>> firstletter =
>>>firstletter.substring(1,1).toUpperCase();
>>> sortable = firstletter + "e" +
>>>keyword.substring(1);
>>> }
>>> </xsp:logic>
>>>
>>>That's how I get it from my database. How can I escape this?
>>>I also experience that cocoon has a problem to resolve &... entites in
>>>general. I allways get the error "The entity * was referenced, but not
>>>declared.
>>>
>>>What is wrong?
>>>
>>>Robert
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: correct use of umlauts
Posted by Robert Sösemann <ro...@gmx.de>.
I use MYSQL and I guess when I extract an attributes content, Cocoons ESQL
converts german umlauts into escaped entities.
I have this problem while generating a site keyword index.
I extract all keywords from my articles in the db, and then sort them
alphabetically. But the Problem is that I don't get the Umlauts sorted
correctly. What I mean is that the german O Umlaut which should be listed
with the normal "O" words appears after "Z".
Thats why I want to filter those special characters with an XSP and tell the
following XSL to sort an umlaut O like "Oe".
But that doesn't work.
----- Original Message -----
From: "Joerg Heinicke" <jo...@gmx.de>
To: <co...@xml.apache.org>
Sent: Sunday, November 17, 2002 1:49 AM
Subject: Re: correct use of umlauts
> Hello Robert,
>
> you are coding XML and not HTML. The German umlauts are only declared in
> HTML as entities. In XML only <, >, ', " and &..; (which
> one was the 5th) are known?
>
> Why do you have Ö in your database? This would be really bad: a
> database should store a character in it, not an "entity, which will be
> later interpreted as a character".
>
> Joerg
>
> Robert Sösemann wrote:
> > Hello, who can help,
> >
> >
> > I have the following code fragment in my xsp page, but I always get an
error
> > because of the use of german umlaut entities like Ö.
> >
> > <xsp:logic>
> > String keyword = <esql:get-string
> > column="k.word"/>;
> > String firstletter =
keyword.substring(0,6);
> > String sortable = keyword;
> >
> >
> > if( firstletter == "Ö" ||
> > firstletter == "ö"
> > || firstletter == "Ä" ||
> > firstletter == "ä"
> > || firstletter == "Ü" ||
> > firstletter == "ü") {
> > firstletter =
> > firstletter.substring(1,1).toUpperCase();
> > sortable = firstletter + "e" +
> > keyword.substring(1);
> > }
> > </xsp:logic>
> >
> > That's how I get it from my database. How can I escape this?
> > I also experience that cocoon has a problem to resolve &... entites in
> > general. I allways get the error "The entity * was referenced, but not
> > declared.
> >
> > What is wrong?
> >
> > Robert
>
>
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: correct use of umlauts
Posted by Joerg Heinicke <jo...@gmx.de>.
Hello Robert,
you are coding XML and not HTML. The German umlauts are only declared in
HTML as entities. In XML only <, >, ', " and &..; (which
one was the 5th) are known?
Why do you have Ö in your database? This would be really bad: a
database should store a character in it, not an "entity, which will be
later interpreted as a character".
Joerg
Robert Sösemann wrote:
> Hello, who can help,
>
>
> I have the following code fragment in my xsp page, but I always get an error
> because of the use of german umlaut entities like Ö.
>
> <xsp:logic>
> String keyword = <esql:get-string
> column="k.word"/>;
> String firstletter = keyword.substring(0,6);
> String sortable = keyword;
>
>
> if( firstletter == "Ö" ||
> firstletter == "ö"
> || firstletter == "Ä" ||
> firstletter == "ä"
> || firstletter == "Ü" ||
> firstletter == "ü") {
> firstletter =
> firstletter.substring(1,1).toUpperCase();
> sortable = firstletter + "e" +
> keyword.substring(1);
> }
> </xsp:logic>
>
> That's how I get it from my database. How can I escape this?
> I also experience that cocoon has a problem to resolve &... entites in
> general. I allways get the error "The entity * was referenced, but not
> declared.
>
> What is wrong?
>
> Robert
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: correct use of umlauts
Posted by William Brogden <wb...@bga.com>.
> -----Original Message-----
> From: Robert Sösemann [mailto:robert.soesemann@gmx.de]
> Sent: Saturday, November 16, 2002 10:01 AM
> To: cocoon-users@xml.apache.org
> Subject: correct use of umlauts
>
>
> Hello, who can help,
>
>
> I have the following code fragment in my xsp page, but I
> always get an error
> because of the use of german umlaut entities like Ö.
>
> <xsp:logic>
> String keyword = <esql:get-string
> column="k.word"/>;
> String firstletter =
> keyword.substring(0,6);
> String sortable = keyword;
>
>
> if( firstletter == "Ö" ||
> firstletter == "ö"
Probably you want firstletter.equals( "Ö" ) NOT ==
wbrogden@bga.com
Author of Soap Programming with Java - Sybex; ISBN: 0782129285
Coauthor of Cocoon 2 Programming - Sybex; ISBN: 0782141315
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>