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: correct use of umlauts
Date Sun, 17 Nov 2002 00:49:00 GMT
Hello Robert,

you are coding XML and not HTML. The German umlauts are only declared in 
HTML as entities. In XML only &lt;, &gt;, &apos;, &quot; and &..; (which

one was the 5th) are known?

Why do you have &Ouml; 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 &Ouml;.
> 
>                           <xsp:logic>
>                                 String keyword = <esql:get-string
> column="k.word"/>;
>                                 String firstletter = keyword.substring(0,6);
>                                 String sortable = keyword;
> 
> 
>                                 if(     firstletter == "&Ouml;" ||
> firstletter == "&ouml;"
>                                     ||  firstletter == "&Auml;" ||
> firstletter == "&auml;"
>                                     ||  firstletter == "&Uuml;" ||
> firstletter == "&uuml;") {
>                                     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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message