Name strategies feature request: camel case

After aving found pages with spaces, commas and whatnot in their names (so in their URL), I decided to activat the Naming Strategies feature, and it’s working pretty well.

For my liking there’s a little feat missing, but before adding a jira issue I’d like to know what orhers think about it

I like the camel casing so common in wiki pages, and I usually use it to form the page name, i.e. (page title => page name):

Project Name - developments, phase one => ProjectNameDevelopmentsPhaseOne

with the naming strategy feature enabled and the forbidden characters defined, it is automatically turning the above page title it into ProjectNamedevelopmentsphaseone, which is close to what I want.

I think that a Convert to camel case option, that would kick in before the forbidden characters filtering, would be good, because with it, the page name will be:

Project Name - developments, phase one => Project Name - Developments, Phase One => ProjectNameDevelopmentsPhaseOne

with no extra efforts or care from the page authors / editors.

I don’t think I’d do it as an option before a naming strategy policy: I think I’d implement a new policy specifically for this. Here, you could easily implement a policy for only keeping ascii characters, and applying camel case, it would be probably the easiest.
Creating a new policy is not very difficult, you can check for example the code for the slug naming strategy here: xwiki-platform/xwiki-platform-core/xwiki-platform-model/xwiki-platform-model-validation/xwiki-platform-model-validation-default/src/main/java/org/xwiki/model/validation/internal/SlugEntityNameValidation.java at master · xwiki/xwiki-platform · GitHub

Don’t hesitate to create a ticket and open a pull request for it if you want to contribute it.

Should that be visible in the administration section? I only see these:

Would that be available as an extension, or will directly be integrated in XWiki distribution?

It’s the “Preformatted names”, the “slug naming strategy” is the technical name :slight_smile:
If you contribute a new one, it will also appear there automatically and you can provide a translation for having a better name than the technical name.

Both options are possible. Now I’m not sure it worth doing an extension just for that, and it could make sense to have it directly in XWiki Standard.

Ahah, good.

Fine, I was just asking.
The fact is, per my requirement it would be an additional feature of the existing policy - I like the flexibility of the Character replacement one.
Anyway, your point makes sense too, of course. I’ll think about it, thanks.