Thomas Rokkjær | 25 Jun 21:37 2007
Picon

Parsing XML Error

I am getting the following error (in IE), when sending a GetFeatureInfo request to GeoServer (1.5.1) through MapBuilder (1.5-alpha1).
Parsing Error:-10728296760 XML Parsing Error: An invalid character was found in text content.
This is due to the fact that the requested shape file contains a text field with danish characters.
This is more than IE can handle.
 
In Firefox I don´t get this error message, but the characters are not translated correctly here either.
 
Does anyone know how I handle the encoding correctly?

--
Best regards

Thomas Rokkjaer
 
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Justin Deoliveira | 25 Jun 23:24 2007

Re: Parsing XML Error

Hi Thomas,

You have stumbled upon a known issue I believe with doing shapefile I/O
with extended character sets.

Chris:I seem to remember a thread on the geotools list about a patch for
this issue. Has the patch been applied, is there a jira around?

-Justin

Thomas Rokkjær wrote:
> I am getting the following error (in IE), when sending a GetFeatureInfo
> request to GeoServer (1.5.1) through MapBuilder (1.5-alpha1).
> Parsing Error:-10728296760 XML Parsing Error: An invalid character was
> found in text content.
> This is due to the fact that the requested shape file contains a text
> field with danish characters.
> This is more than IE can handle.
>  
> In Firefox I don´t get this error message, but the characters are not
> translated correctly here either.
>  
> Does anyone know how I handle the encoding correctly?
> 
> -- 
> Best regards
> 
> Thomas Rokkjaer
>  
> !DSPAM:4007,468019b1214891961014482!
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> 
> !DSPAM:4007,468019b1214891961014482!
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
> 
> 
> !DSPAM:4007,468019b1214891961014482!

--

-- 
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Chris Holmes | 25 Jun 23:40 2007

Re: Parsing XML Error

No, it's not been applied.  It's annoying to apply since there are two 
shapefile datastores (indexed and non-indexed), and it'd need to be done 
on multiple branches.  I put comments on: 
http://jira.codehaus.org/browse/GEOT-1210

The code works on 2.0.x, it's three classes that change - the datastore 
factory, the datastore, and the dbf reader.  I'd imagine that's so far 
out of date that a patch wouldn't apply right.

Chris

Justin Deoliveira wrote:
> Hi Thomas,
> 
> You have stumbled upon a known issue I believe with doing shapefile I/O
> with extended character sets.
> 
> Chris:I seem to remember a thread on the geotools list about a patch for
> this issue. Has the patch been applied, is there a jira around?
> 
> -Justin
> 
> Thomas Rokkjær wrote:
>> I am getting the following error (in IE), when sending a GetFeatureInfo
>> request to GeoServer (1.5.1) through MapBuilder (1.5-alpha1).
>> Parsing Error:-10728296760 XML Parsing Error: An invalid character was
>> found in text content.
>> This is due to the fact that the requested shape file contains a text
>> field with danish characters.
>> This is more than IE can handle.
>>  
>> In Firefox I don´t get this error message, but the characters are not
>> translated correctly here either.
>>  
>> Does anyone know how I handle the encoding correctly?
>>
>> -- 
>> Best regards
>>
>> Thomas Rokkjaer
>>  
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>>
>> !DSPAM:4007,468019b1214891961014482!
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Geoserver-users mailing list
>> Geoserver-users <at> lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>>
>> !DSPAM:4007,468019b1214891961014482!
> 
> 

--

-- 
Chris Holmes
The Open Planning Project
http://topp.openplans.org
Attachment (cholmes.vcf): text/x-vcard, 282 bytes
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Andrea Aime | 26 Jun 07:55 2007

Re: Parsing XML Error

Chris Holmes ha scritto:
> No, it's not been applied.  It's annoying to apply since there are two 
> shapefile datastores (indexed and non-indexed), and it'd need to be done 
> on multiple branches.  I put comments on: 
> http://jira.codehaus.org/browse/GEOT-1210
> 
> The code works on 2.0.x, it's three classes that change - the datastore 
> factory, the datastore, and the dbf reader.  I'd imagine that's so far 
> out of date that a patch wouldn't apply right.

Thomas, can you share the failing shapefile so that we can derive a
test case out of it? (Which means we'll have to grab a couple of records
from it and store the resulting shapefile among the Geotools sources?).

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Thomas Rokkjær | 26 Jun 10:09 2007
Picon

Re: Parsing XML Error

Yes. I made a really simple one, which consists of four records, where one of them uses a danish letter.
 
Best regards
Thomas Rokkjaer

 
On 6/26/07, Andrea Aime <aaime <at> openplans.org> wrote:
Chris Holmes ha scritto:
> No, it's not been applied.  It's annoying to apply since there are two
> shapefile datastores (indexed and non-indexed), and it'd need to be done
> on multiple branches.  I put comments on:
> http://jira.codehaus.org/browse/GEOT-1210
>
> The code works on 2.0.x, it's three classes that change - the datastore
> factory, the datastore, and the dbf reader.  I'd imagine that's so far
> out of date that a patch wouldn't apply right.

Thomas, can you share the failing shapefile so that we can derive a
test case out of it? (Which means we'll have to grab a couple of records
from it and store the resulting shapefile among the Geotools sources?).

Cheers
Andrea



--
Med venlig hilsen

Thomas Rokkjær
Mobil 3095 0774

http://picasaweb.google.com/thomas.rokkjaer
Attachment (test_point.dbf): application/octet-stream, 263 bytes
Attachment (test_point.prj): application/octet-stream, 534 bytes
Attachment (test_point.shp): application/octet-stream, 287 bytes
Attachment (test_point.shx): application/octet-stream, 178 bytes
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Andrea Aime | 26 Jun 11:17 2007

Re: Parsing XML Error

Thomas Rokkjær ha scritto:
> Yes. I made a really simple one, which consists of four records, where 
> one of them uses a danish letter.

Good, I attached it to http://jira.codehaus.org/browse/GEOT-1210.
I'll fix this in the next days, stay tuned (you can watch the issue
to be notified of changes on it, and then grab a Geoserver nightly
to test it).
Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Thomas Rokkjær | 26 Jun 15:28 2007
Picon

Re: Parsing XML Error

Actually I now believe it is more a problem with MapBuilder than GeoServer.
I tried adding the layer on a MapServer and access this layer through the same MapBuilder solution instead of the one from the GeoServer. Still the same error is presented in IE, eventhough I tried setting the request and response encoding as both UTF-8 and ISO-8859-1.
 
I haven´t put this information in the GeoTools JIRA.
 
Best regards
Thomas Rokkjaer


 
On 6/26/07, Andrea Aime <aaime <at> openplans.org> wrote:
Thomas Rokkjær ha scritto:
> Yes. I made a really simple one, which consists of four records, where
> one of them uses a danish letter.

Good, I attached it to http://jira.codehaus.org/browse/GEOT-1210.
I'll fix this in the next days, stay tuned (you can watch the issue
to be notified of changes on it, and then grab a Geoserver nightly
to test it).
Cheers
Andrea



--
Med venlig hilsen

Thomas Rokkjær
Mobil 3095 0774

http://picasaweb.google.com/thomas.rokkjaer
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Andrea Aime | 26 Jun 15:47 2007

Re: Parsing XML Error

Thomas Rokkjær ha scritto:
> Actually I now believe it is more a problem with MapBuilder than GeoServer.
> I tried adding the layer on a MapServer and access this layer through 
> the same MapBuilder solution instead of the one from the GeoServer. 
> Still the same error is presented in IE, eventhough I tried setting the 
> request and response encoding as both UTF-8 and ISO-8859-1.

Hum... or maybe MapServer too has troubles serving files in UTF8?
Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Thomas Rokkjær | 27 Jun 08:24 2007
Picon

Re: Parsing XML Error

I agree. Especially after testing both WMS/WFS servers through another GIS client (MapInfo), where I found there were problems translating the danish characters too.
 
/Thomas

 
On 6/26/07, Andrea Aime <aaime <at> openplans.org> wrote:
Thomas Rokkjær ha scritto:
> Actually I now believe it is more a problem with MapBuilder than GeoServer.
> I tried adding the layer on a MapServer and access this layer through
> the same MapBuilder solution instead of the one from the GeoServer.
> Still the same error is presented in IE, eventhough I tried setting the
> request and response encoding as both UTF-8 and ISO-8859-1.

Hum... or maybe MapServer too has troubles serving files in UTF8?
Cheers
Andrea



--
Med venlig hilsen

Thomas Rokkjær
Mobil 3095 0774

http://picasaweb.google.com/thomas.rokkjaer
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Andrea Aime | 27 Jun 19:58 2007

Re: Parsing XML Error

Thomas Rokkjær ha scritto:
> Yes. I made a really simple one, which consists of four records, where 
> one of them uses a danish letter.

Thomas, is the danish letter an o with a stroke over it?
That is, the is the string "Charløtte"? (not sure the string will
get to you intact). If so, the shapefile reader is grabbing it fine,
the issue must be somewhere else.

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Thomas Rokkjær | 28 Jun 07:55 2007
Picon

Re: Parsing XML Error

Yes that is how it should look. So where do you think the problem is originating from?
I know that the encoding "ISO-8859-1" can handle danish characters, while the encoding "UTF-8" can´t. Is all information sent and received using UTF-8 and if so, could this be an option in GeoServer?
 
Best regards
Thomas Rokkjaer


 
On 6/27/07, Andrea Aime <aaime <at> openplans.org> wrote:
Thomas Rokkjær ha scritto:
> Yes. I made a really simple one, which consists of four records, where
> one of them uses a danish letter.

Thomas, is the danish letter an o with a stroke over it?
That is, the is the string "Charløtte"? (not sure the string will
get to you intact). If so, the shapefile reader is grabbing it fine,
the issue must be somewhere else.

Cheers
Andrea



--
Med venlig hilsen

Thomas Rokkjær
Mobil 3095 0774

http://picasaweb.google.com/thomas.rokkjaer
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Andrea Aime | 28 Jun 08:58 2007

Re: Parsing XML Error

Thomas Rokkjær ha scritto:
> Yes that is how it should look. So where do you think the problem is 
> originating from?
> I know that the encoding "ISO-8859-1" can handle danish characters, 
> while the encoding "UTF-8" can´t. Is all information sent and received 
> using UTF-8 and if so, could this be an option in GeoServer?

Java handles everything in UTF-8 internally, but UTF8 should be able
to handle that character afaik... my guess is that that char
is encoded as two bytes in UTF8, so decoding does not work well
if the reader is assuming the file is in UTF-8 while it is in
fact in ISO-8859-1.

I can read the file properly because I'm on Windows XP, and cp1252,
the charset used by default on Windows, it's really similar to
ISO-8859-1, whilst you're probably on Linux, where UTF8 is assumed
(and java defaults to the system defaults).

Anyways, I'm going to work on this a little bit more, then I'll
probably ask you to have a look at the results on your system.

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Andrea Aime | 28 Jun 09:08 2007

Re: Parsing XML Error

Andrea Aime ha scritto:
> Java handles everything in UTF-8 internally, 

I was wrong, java uses utf-16 internally:
http://java.sun.com/javase/technologies/core/basic/intl/faq.jsp

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Thomas Rokkjær | 28 Jun 10:20 2007
Picon

Re: Parsing XML Error

Thanks.
Just to clearify. I am on Win XP SP2.
 
/Thomas

 
On 6/28/07, Andrea Aime <aaime <at> openplans.org> wrote:
Thomas Rokkjær ha scritto:
> Yes that is how it should look. So where do you think the problem is
> originating from?
> I know that the encoding "ISO-8859-1" can handle danish characters,
> while the encoding "UTF-8" can´t. Is all information sent and received
> using UTF-8 and if so, could this be an option in GeoServer?

Java handles everything in UTF-8 internally, but UTF8 should be able
to handle that character afaik... my guess is that that char
is encoded as two bytes in UTF8, so decoding does not work well
if the reader is assuming the file is in UTF-8 while it is in
fact in ISO-8859-1.

I can read the file properly because I'm on Windows XP, and cp1252,
the charset used by default on Windows, it's really similar to
ISO-8859-1, whilst you're probably on Linux, where UTF8 is assumed
(and java defaults to the system defaults).

Anyways, I'm going to work on this a little bit more, then I'll
probably ask you to have a look at the results on your system.

Cheers
Andrea



--
Med venlig hilsen

Thomas Rokkjær
Mobil 3095 0774

http://picasaweb.google.com/thomas.rokkjaer
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Andrea Aime | 28 Jun 10:37 2007

Re: Parsing XML Error

Thomas Rokkjær ha scritto:
> Thanks.
> Just to clearify. I am on Win XP SP2.

Sigh, then the error is in XML encoding, not in the shapefile reading :(
I'll have a look at it as well
Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Andrea Aime | 28 Jun 11:58 2007

Re: Parsing XML Error

Thomas Rokkjær ha scritto:
> Thanks.
> Just to clearify. I am on Win XP SP2.

Thomas,
I'm getting the attached XML out of Geoserver,
but I don't get any error neither from Firefox
neither from IE7... shall the stroked o be
escaped instead of reported directly?

Cheers
Andrea
Attachment (danish_point.gml.xml): text/xml, 3159 bytes
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Thomas Rokkjær | 3 Jul 09:45 2007
Picon

Re: Parsing XML Error

Hi Andrea
 
Sorry for the late reply. But here goes...
 
The stroked o "ø" should be reported directly.
If I fetch the url, which is being used in my GetFeatureInfo and sends this directly to Firefox or IE then I get a correctly formated response from the GeoServer too (including the danish characters reported directly).
But when it is displayed within the index.html page the danish characters gives the beforementioned error in IE and are displayed in Firefox with a "?" or the classic "unknown symbol" instead of danish characters.
 
See the example below:
Layer


Hope this helps in solving this problem.
 
Best regards
Thomas Rokkjaer
 
On 6/28/07, Andrea Aime <aaime <at> openplans.org> wrote:
Thomas Rokkjær ha scritto:
> Thanks.
> Just to clearify. I am on Win XP SP2.

Thomas,
I'm getting the attached XML out of Geoserver,
but I don't get any error neither from Firefox
neither from IE7... shall the stroked o be
escaped instead of reported directly?

Cheers
Andrea




--
Med venlig hilsen

Thomas Rokkjær
Mobil 3095 0774

http://picasaweb.google.com/thomas.rokkjaer
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Andrea Aime | 3 Jul 09:52 2007

Re: Parsing XML Error

Thomas Rokkjær ha scritto:
> Hi Andrea
>  
> Sorry for the late reply. But here goes...
>  
> The stroked o "ø" should be reported directly.
> If I fetch the url, which is being used in my GetFeatureInfo and sends 
> this directly to Firefox or IE then I get a correctly formated response 
> from the GeoServer too (including the danish characters reported directly).
> But when it is displayed within the index.html page the danish 
> characters gives the beforementioned error in IE and are displayed in 
> Firefox with a "?" or the classic "unknown symbol" instead of danish 
> characters.

I see... which format do you use for GetFeatureInfo?
If it's XML and then you do some XSLT, it's the client side business
to handle the issue, because we generate correct XML.
If instead you're asking data in another format, such as HTML, then
yeah, I guess Geoserver is not properly escaping these character
into correct HTML escape codes (I'll have to look for a library that
is able to do proper HTML entity escaping).

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Thomas Rokkjaer | 3 Jul 10:00 2007
Picon

Re: Parsing XML Error

My URL looks like the following (ie GML):
GetFeatureInfo.xsl:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:wmc="http://www.opengis.net/context" xmlns:xlink=" http://www.w3.org/1999/xlink" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml"/><xsl:strip-space elements="*"/><xsl:param name="queryLayer">highways</xsl:param><xsl:param name="xCoord">1</xsl:param><xsl:param name="yCoord">1</xsl:param><xsl:param name="infoFormat">text/html</xsl:param><xsl:param name="imgFormat">image/png</xsl:param><xsl:param name="featureCount">1</xsl:param><xsl:variable name="bbox"><xsl:value-of select="/wmc: ViewContext/wmc:General/wmc:BoundingBox/ <at> minx"/>,<xsl:value-of select="/wmc:ViewContext/wmc:General/wmc:BoundingBox/ <at> miny"/>,<xsl:value-of select="/wmc:ViewContext/wmc:General/wmc:BoundingBox/ <at> maxx "/>,<xsl:value-of select="/wmc:ViewContext/wmc:General/wmc:BoundingBox/ <at> maxy"/></xsl:variable><xsl:variable name="width"><xsl:value-of select="/wmc:ViewContext/wmc:General/wmc:Window/ <at> width "/></xsl:variable><xsl:variable name="height"><xsl:value-of select="/wmc:ViewContext/wmc:General/wmc:Window/ <at> height"/></xsl:variable><xsl:variable name="srs" select="/wmc: ViewContext/wmc:General/wmc:BoundingBox/ <at> SRS"/><xsl:template match="/"><url><xsl:apply-templates select="wmc:ViewContext/wmc:LayerList"/><error>URL not calculated for layer=<xsl:value-of select="$queryLayer"/></error></url></xsl:template><xsl:template match="wmc:Layer"><xsl:if test="contains($queryLayer,wmc:Name)"><xsl:variable name="version"><xsl:value-of select=" wmc:Server/ <at> version"/></xsl:variable><xsl:variable name="baseUrl"><xsl:value-of select="wmc:Server/wmc:OnlineResource/ <at> xlink:href"/></xsl:variable><xsl:variable name="firstJoin"><xsl:choose><xsl:when test="substring($baseUrl,string-length($baseUrl))='?'"/><xsl:when test="contains($baseUrl, '?')">&amp;</xsl:when><xsl:otherwise>?</xsl:otherwise></xsl:choose></xsl:variable><xsl:value-of select="$baseUrl"/><xsl:value-of select="$firstJoin"/>VERSION=<xsl:value-of select="$version"/>&amp;REQUEST=GetFeatureInfo&amp;LAYERS=<xsl:value-of select="$queryLayer"/>&amp;SRS=<xsl:value-of select="$srs"/>&amp;BBOX=<xsl:value-of select="$bbox"/>&amp;WIDTH=<xsl:value-of select="$width"/>&amp;HEIGHT=<xsl:value-of select="$height"/>&amp;INFO_FORMAT=<xsl:value-of select="$infoFormat"/>&amp;FORMAT=<xsl:value-of select="$imgFormat"/>&amp;FEATURE_COUNT=<xsl:value-of select="$featureCount"/>&amp;QUERY_LAYERS=<xsl:value-of select="$queryLayer"/>&amp;X=<xsl:value-of select="$xCoord"/>&amp;Y=<xsl:value-of select="$yCoord"/></xsl:if></xsl:template></xsl:stylesheet>
 
/Thomas
 
On 7/3/07, Andrea Aime <aaime <at> openplans.org> wrote:
Thomas Rokkjær ha scritto:
> Hi Andrea
>
> Sorry for the late reply. But here goes...
>
> The stroked o "ø" should be reported directly.
> If I fetch the url, which is being used in my GetFeatureInfo and sends
> this directly to Firefox or IE then I get a correctly formated response
> from the GeoServer too (including the danish characters reported directly).
> But when it is displayed within the index.html page the danish
> characters gives the beforementioned error in IE and are displayed in
> Firefox with a "?" or the classic "unknown symbol" instead of danish
> characters.

I see... which format do you use for GetFeatureInfo?
If it's XML and then you do some XSLT, it's the client side business
to handle the issue, because we generate correct XML.
If instead you're asking data in another format, such as HTML, then
yeah, I guess Geoserver is not properly escaping these character
into correct HTML escape codes (I'll have to look for a library that
is able to do proper HTML entity escaping).

Cheers
Andrea



--
Med venlig hilsen

Thomas Rokkjær
Mobil 3095 0774

http://picasaweb.google.com/thomas.rokkjaer
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Andrea Aime | 6 Jul 19:42 2007

Re: Parsing XML Error

Thomas Rokkjaer ha scritto:
> My URL looks like the following (ie GML):
> " 
>
http://infudv1:8080/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=brnby:testPoints_point&SRS=EPSG:25832&BBOX=710084.36,6168442.59,719205.09,6175139.87&WIDTH=600&HEIGHT=400&INFO_FORMAT=application/vnd.ogc.gml&FORMAT=image/png&FEATURE_COUNT=1&QUERY_LAYERS=brnby:testPoints_point&X=288&Y=192 
> <http://infudv1:8080/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=brnby:testPoints_point&SRS=EPSG:25832&BBOX=710084.36,6168442.59,719205.09,6175139.87&WIDTH=600&HEIGHT=400&INFO_FORMAT=application/vnd.ogc.gml&FORMAT=image/png&FEATURE_COUNT=1&QUERY_LAYERS=brnby:testPoints_point&X=288&Y=192>"
>  
> GetFeatureInfo.xsl:
> <?xml version="1.0"?>

Hmmm... this look like a client side issue. The trouble is
that your XSLT does not handle the transformation from the direct
stroked o (valid in XML) to the HTML escape code.
May it be that you have to set the output method of xslt to html?

See this thread (found googling for "xslt escape"):
http://www.stylusstudio.com/xsllist/200406/post40240.html#

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

Gmane