Hi Murray!
Problems arise when you unduly restrict users. Mine need to use chemical
names, graphical Unicode characters, quotes, double quotes, etc. (Poison
Center = chemistry, Grammarians = pages speaking about punctuation signs)
Java is simple and powerful so programs should remain simple... What I
mean by this is that a single API for WikiName
/ validation
/ normalization
/ indexation
/ as a file name
/ as a JCR node identifier
/ as an XML ID
/ as an URL
/ as presented to the user (HTML)
/ ...
would be easy to implement in Java and no complex parameterization would
be needed (one not knowing Java could always use existing WikiName
normalizer). One parameter in jspwiki.properties would be enough :
pagename.normalizer=org.jspwiki.normalizers.CamelCase (for instance).
This could be a "multi-facetted" bean: when you set the data in one mode
(URL for instance), you could get it in all other mode (user
presentation, file name, etc.).
Just ideas... Have a nice day!
Christophe
Murray Altheim a écrit :
Christophe Dupriez wrote:
Hi and Merry Christmas Season!
I had a lot of trouble with WikiNormalization in 2.4. I strongly
support the idea of removing most constraints (for instance, most
Unicode printable characters should be allowed). I support the idea
of removing duplicated spaces.
A small addition to your rules: I think it most of the time helps to
remove spaces at beginining and at end of page names.
May be the normalizer should be made "pluggable" with CamelCase being
one of those provided ?
Hi Christophe,
This is one idea I do like, since I seem to be in the minority as
regards naming conventions. I'd like my WikiNames to contain *no*
spaces and additionally conform to being XML Names as well as being
directly convertable to URLs (noting that whatever is the result of
the normalization, it'll also have to be converted somehow to URLs,
and I'd like my URLs to be human readable, i.e., not include escape
characters. That's a lot more constraints than I'm hearing others
want, but it really simplifies things for users. [I can't imagine
the confusion of having a page name that included a leading or
trailing space!]
If there was an abstract class or an interface for the name
conversion utility I'd be able to write my own. It sounds like it
might be composed of a series of one or more transformations that
the name would be passed through, perhaps an interface for the
transformer, which could be recursive (i.e., one calls a transformer
that acts as a wrapper, which calls any internal transformers, one
that handles character mapping, one that handles case, validation,
etc.).
Obviously one wouldn't change normalization rules on an existing
wiki, but for new wikis this wouldn't be a issue.
Murray
...........................................................................
Murray Altheim <murray08 at altheim dot com>
=== = =
http://www.altheim.com/murray/ =
= ===
SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk =
= = =
Boundless wind and moon - the eye within eyes,
Inexhaustible heaven and earth - the light beyond light,
The willow dark, the flower bright - ten thousand houses,
Knock at any door - there's one who will respond.
-- The Blue Cliff Record