I have no idea why you're getting spaces ... It should be using the 
englishLocalizer()'s plurifying. Do you maybe have localizations defined that 
map "MediaSection" to "Media Section"?

I pushed the pluralization of the root node down into the rest format which can 
now be controlled by the property ERXRest.pluralEntityNames=false. This will 
also turn off the default pluralization on URLs, so you will want to construct 
your ERXRouteRequestHandler with the NameFormat explicitly if you want to 
retain plural urls.

I suspect the spacing is some weird overlap between pluralization and display 
keys. Slightly tricky problem there if it is, because it's unclear the best way 
to fix that in the general case. It might make sense to declare a "Rest" 
language, so we don't inherit any normal overrides. I'll have to fiddle with 
that at some point.

On Jul 4, 2010, at 3:54 AM, Farrukh Ijaz wrote:

> Hi,
> 
> I'm using ERRest Framework. I want to understand how the Plural names are 
> being picked up by the Framework.
> 
> I've few entities as MediaDocument, MediaImage and MediaSection. I have added 
> them to the handler using addDefaultRoutes(?.ENTITY_NAME) method. I don't 
> know why the response is different in creating the parent tag.
> 
> Following are the routes:
> 
> /ra/MediaDocument -> MediaDocument
> /ra/MediaImage -> MediaImage
> /ra/MediaSection -> MediaSection
> 
> For MediaDocument it uses <Documents type="MediaDocument">, for MediaImage it 
> uses <Images type="MediaImage"> and for MediaSection it uses <Media Sections 
> type="MediaSection">.
> 
> For MediaSection, it is considered as Malformed XML as the tag name contains 
> space i.e. <Media Sections type="MediaSection">
> 
> Am I'm missing some configuration?
> 
> Farrukh
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40pobox.com
> 
> This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to