MapServer / MapServer-import

3 stars 2 forks source link

[OWS-Common] add ows_language metadata #1955

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: tomkralidis Date: 2006/11/02 - 19:58

For the record:

Bart,

I've implemented this on my local CVS, and will open a bug report for the record.

..Tom

> -----Original Message-----
> From: Bart van den Eijnden (OSGIS) [mailto:bartvde@osgis.nl] 
> Sent: 02 November, 2006 1:55 PM
> To: Kralidis,Tom [Burlington]
> Cc: MAPSERVER-DEV@LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-DEV] addition of language metadata
> 
> Hi Tom,
> 
> I think this would be valuable. In The Netherlands a WMS 
> profile is being developed, and one of the things is that 
> GetFeatureInfo needs to be given at least in Dutch. So it 
> would be good being able to specify the language explicitly. 
> But I guess you're talking about exception messages only for now.
> 
> Best regards,
> Bart
> 
> Kralidis,Tom [Burlington] schreef:
> > Hi,
> >
> > Does anyone think that something like:
> >
> > MAP/WEB/METADATA/"ows_language"
> >
> > Would be valuable?  Note that language is a part of the OGC 
> OWS Common 
> > 1.0.0 specification.  Example:
> >
> > <?xml version="1.0" encoding="ISO-8859-1"?> <ows:ExceptionReport 
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:ows="http://www.opengis.net/ows" version="0.0.31" 
> language="en-CA"
> > xsi:schemaLocation="http://www.opengis.net/ows
> > http://schemas.opengeospatial.net/ows/1.0.0/owsExceptionReport.xsd">
> >   <ows:Exception exceptionCode="MissingParameterValue"
> > locator="layers"/>
> > </ows:ExceptionReport>
> >
> > Codewise, I would see something like, in mapows.c:
> >
> > const char *msOWSGetLanguage(mapObj *map) {
> >     const char *language;
> >
> >     language = msLookupHashTable(&(map->web.metadata), 
> "ows_language");
> >     if (language == NULL) {
> >       language = "undefined";
> >     }
> >     return language;
> > }
> >
> > Benefits:
> >
> > - OWS clients will be aware of the language of the OWS XML content
> >
> > Comments?
> >
> > ..Tom
> >
> >
> >   
>
tbonfort commented 12 years ago

Author: tomkralidis Date: 2006/11/02 - 20:04


Bart,

As far as actually putting this out in the code, we can start with
ExceptionReport  elements in OGC:SOS.  When the other OWSs encompass OWS Common,
then their XML will support it (i.e. output of elements or attributes for
language), and we will be ready for it via the function defined below.
tbonfort commented 12 years ago

Author: tomkralidis Date: 2006/11/02 - 20:09


I've committed this in CVS HEAD under mapows.c (msOWSGetLanguage).

Jeff (added to cc): for documentation.  For now, under the OGC:SOS documentation
(Web Object Metadata):

ows_language

    * Description: (Optional) Descriptive narrative for more information about
the server. Identifier of the language used by all included exception text
values. These language identifiers shall be as specified in IETF RFC 1766. When
this attribute is omitted, the language used is not identified.  Examples:
"en-CA", "fr-CA", "en-US".
tbonfort commented 12 years ago

Author: tomkralidis Date: 2006/11/02 - 20:11


assigning to Jeff for docs.
tbonfort commented 12 years ago

Author: tomkralidis Date: 2006/11/06 - 16:32


Update: msOWSLanguage, if called in the context of an exception, will always
return en-US.  Else, it will fetch MAP/WEB/METADATA/ows_language
tbonfort commented 12 years ago

Author: tomkralidis Date: 2006/11/10 - 02:43


FYI maperror.h now has a #define called MS_ERROR_LANGUAGE "en-US" for use by
error handlers.
tbonfort commented 12 years ago

Author: tomkralidis Date: 2007/12/31 - 15:51 Updated SOS Server howto. Closing