You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by Janne Jalkanen <Ja...@ecyrd.com> on 2008/12/09 00:03:03 UTC

WikiName

Folks,

I just checked in a new class called WikiName (in the *.content- 
package) into the JSPWIKI_JCR_BRANCH.  The point of this class is to  
make it easier to support a multiwiki/subpage setup (so that we don't  
have to keep parsing/reparsing the paths in String format).  It's a  
fairly straightforward thing to add transparent support to WikiPage  
as well.

Since it's not really that dependent on JCR itself, I'm wondering if  
it would make sense to check it into the trunk as well.  Could you  
please check if it's a good or a bad idea, and whether it's ok to add  
to the trunk - and most importantly, would it make your life easier  
or harder?  [I would imagine this would make Andrew's job easier at  
least.]

(Note, there is no factory yet, but one should probably be added.)

/Janne

Re: WikiName

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
Done.  However, there is a question on how we will do the subpage  
references, etc.  The following sounds logical to me:

Assume in all that current WikiContext contains page "Foo:Bar/ 
Subpage", that is - that is the page which is being rendered.
Then:

"foo.jpg" => Check if "Foo:Bar/Subpage/foo.jpg" exists; if not,  
resolve to "Foo:Bar/foo.jpg" (This is consistent with current  
attachment references)
"/foo.jpg" => Always resolves to "Foo:Bar/Subpage/foo.jpg"
"../foo.jpg" => "Foo:foo.jpg"
"Test:Bar" => Is an FQN, therefore resolves to "Test:Bar"

I worry a bit about the "/pagename", since it kinda looks to me like  
a root reference (though there is no reason why it should be). But it  
is kinda logical - it refers to something "under this page".

/Janne

On Dec 9, 2008, at 04:59 , Andrew Jaquith wrote:

> +1 for putting it in the trunk. I need it to do hierarchy-aware  
> PagePermissions.
>
> On Dec 8, 2008, at 18:03, Janne Jalkanen <Ja...@ecyrd.com>  
> wrote:
>
>> Folks,
>>
>> I just checked in a new class called WikiName (in the *.content- 
>> package) into the JSPWIKI_JCR_BRANCH.  The point of this class is  
>> to make it easier to support a multiwiki/subpage setup (so that we  
>> don't have to keep parsing/reparsing the paths in String format).   
>> It's a fairly straightforward thing to add transparent support to  
>> WikiPage as well.
>>
>> Since it's not really that dependent on JCR itself, I'm wondering  
>> if it would make sense to check it into the trunk as well.  Could  
>> you please check if it's a good or a bad idea, and whether it's ok  
>> to add to the trunk - and most importantly, would it make your  
>> life easier or harder?  [I would imagine this would make Andrew's  
>> job easier at least.]
>>
>> (Note, there is no factory yet, but one should probably be added.)
>>


Re: WikiName

Posted by Andrew Jaquith <an...@gmail.com>.
+1 for putting it in the trunk. I need it to do hierarchy-aware  
PagePermissions.

On Dec 8, 2008, at 18:03, Janne Jalkanen <Ja...@ecyrd.com>  
wrote:

> Folks,
>
> I just checked in a new class called WikiName (in the *.content- 
> package) into the JSPWIKI_JCR_BRANCH.  The point of this class is to  
> make it easier to support a multiwiki/subpage setup (so that we  
> don't have to keep parsing/reparsing the paths in String format).   
> It's a fairly straightforward thing to add transparent support to  
> WikiPage as well.
>
> Since it's not really that dependent on JCR itself, I'm wondering if  
> it would make sense to check it into the trunk as well.  Could you  
> please check if it's a good or a bad idea, and whether it's ok to  
> add to the trunk - and most importantly, would it make your life  
> easier or harder?  [I would imagine this would make Andrew's job  
> easier at least.]
>
> (Note, there is no factory yet, but one should probably be added.)
>
> /Janne

Re: WikiName

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
The WikiName class is just a convenience refactoring and has nothing  
to do with spaces in wikinames.

As for the spaces in wikinames, I cannot find a JIRA issue about  
this.  The feature has existed since 2.5.something, so obviously  
we're not dealing with a new feature here.

Murray, you are a committer in this project.  I nominate you to find  
a good solution for this in 3.0 timeframe...

/Janne

On Dec 9, 2008, at 02:39 , Murray Altheim wrote:

> Janne Jalkanen wrote:
>> Folks,
>> I just checked in a new class called WikiName (in the *.content- 
>> package) into the JSPWIKI_JCR_BRANCH.  The point of this class is  
>> to make it easier to support a multiwiki/subpage setup (so that we  
>> don't have to keep parsing/reparsing the paths in String format).   
>> It's a fairly straightforward thing to add transparent support to  
>> WikiPage as well.
>> Since it's not really that dependent on JCR itself, I'm wondering  
>> if it would make sense to check it into the trunk as well.  Could  
>> you please check if it's a good or a bad idea, and whether it's ok  
>> to add to the trunk - and most importantly, would it make your  
>> life easier or harder?  [I would imagine this would make Andrew's  
>> job easier at least.]
>
> Janne,
>
> I haven't had a chance to check out any recent code, but one of the
> issues I brought up a loooonng time ago now when the change occurred
> was the new "feature" that permitted whitespace in WikiNames. This
> has been no end of a hassle with users, as they *often* create pages
> with whitespace in them (accidentally or deliberately), and then
> have difficulties referring to the pages, or end up with two pages,
> one with and one without the space (e.g., "JohnSmith" and "John Smith"
> / "John%20Smith"). I find myself fixing page names and trying to
> explain what is going on. I never had difficulty explaining camelcase
> names.
>
> What I'd love to see would be some utility in the new class to either
> normalise the names in either direction (to either permit or prohibit
> whitespace), or a flag that when true simply eliminated the whitespace
> on the name parameter in the constructor.
>
> The presence of whitespace in page names will (to my mind) be only
> made worse with the possibility of whitespace in path/directory/
> namespace names. Users generally do not want to deal with these
> kinds of issues, and they have a heck of a time with "%20" showing
> up in paths and URLs that they sometimes have to type or otherwise
> share with others.
>
> 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


Re: WikiName

Posted by Murray Altheim <mu...@altheim.com>.
Murray Altheim wrote:
[...]
> The presence of whitespace in page names will (to my mind) be only
> made worse with the possibility of whitespace in path/directory/
> namespace names. Users generally do not want to deal with these
> kinds of issues, and they have a heck of a time with "%20" showing
> up in paths and URLs that they sometimes have to type or otherwise
> share with others.

I also thought to add that the TagPlugin requires that the tag name
be a wiki page name. That way, all tags are always resolvable to the
definition as found on the page. However, if the page name includes
whitespace, there is no way currently to handle the spaces (in the
tag parser), nor would I want to have users dealing with learning
how to escape whitespace in names. Then there's that previously
mentioned issue of having two pages whose names only differ in
whitespace.

[I'd thought you'd at some point mentioned some way of turning off
this whitespace-in-name "feature" but I can't find that documented
anywhere]

Cheers,

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

Re: Spaces in Wiki names was-> RE: WikiName

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
WikiName refactoring will not help in any way (neither will it stop  
anything from being done).

TestPage and Test Page are two different names, since one contains a  
space and one does not contain a space.  We have a normalization  
which looks (for backwards compatibility reasons) for "TestPage" if  
"Test Page" is not found.  This could, of course, be disabled.

/Janne

On Dec 9, 2008, at 14:56 , Volkar, John M. wrote:

> I HATE the %20 mess in the URLs, the silly thing is totally
> inconsistent.  Anything that will help move forward to a normalized
> naming scheme is welcome.
>
> Create a page by typing the following in a page, then clicking the  
> link.
> * [Test Page]
>
> It gets created as "Test%20Page" (in the URL and on disk).
>
>
> Now try to reference it from another page with:
> * [TestPage]
> * or if CamelCase is enabled, just TestPage
>
> The link offers to create a new page for you!  Do so.
>
> Now you have TWO different pages "Test Page" and "TestPage".
>
> ICK.
>
> Regards,
> John Volkar
>
>
>
> -----Original Message-----
> From: Murray Altheim [mailto:murray08@altheim.com]
> Sent: Monday, December 08, 2008 7:39 PM
> To: jspwiki-dev@incubator.apache.org
> Subject: Re: WikiName
>
> Janne Jalkanen wrote:
>> Folks,
>>
>> I just checked in a new class called WikiName (in the
>> *.content-package) into the JSPWIKI_JCR_BRANCH.  The point of this
>> class is to make it easier to support a multiwiki/subpage setup (so
>> that we don't have to keep parsing/reparsing the paths in String
>> format).  It's a fairly straightforward thing to add transparent
> support to WikiPage as well.
>>
>> Since it's not really that dependent on JCR itself, I'm wondering if
>> it would make sense to check it into the trunk as well.  Could you
>> please check if it's a good or a bad idea, and whether it's ok to add
>> to the trunk - and most importantly, would it make your life  
>> easier or
> harder?
>> [I would imagine this would make Andrew's job easier at least.]
>
> Janne,
>
> I haven't had a chance to check out any recent code, but one of the
> issues I brought up a loooonng time ago now when the change  
> occurred was
> the new "feature" that permitted whitespace in WikiNames. This has  
> been
> no end of a hassle with users, as they *often* create pages with
> whitespace in them (accidentally or deliberately), and then have
> difficulties referring to the pages, or end up with two pages, one  
> with
> and one without the space (e.g., "JohnSmith" and "John Smith"
> / "John%20Smith"). I find myself fixing page names and trying to  
> explain
> what is going on. I never had difficulty explaining camelcase names.
>
> What I'd love to see would be some utility in the new class to either
> normalise the names in either direction (to either permit or prohibit
> whitespace), or a flag that when true simply eliminated the whitespace
> on the name parameter in the constructor.
>
> The presence of whitespace in page names will (to my mind) be only  
> made
> worse with the possibility of whitespace in path/directory/ namespace
> names. Users generally do not want to deal with these kinds of issues,
> and they have a heck of a time with "%20" showing up in paths and URLs
> that they sometimes have to type or otherwise share with others.
>
> 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


Spaces in Wiki names was-> RE: WikiName

Posted by "Volkar, John M." <JV...@medrad.com>.
I HATE the %20 mess in the URLs, the silly thing is totally
inconsistent.  Anything that will help move forward to a normalized
naming scheme is welcome.

Create a page by typing the following in a page, then clicking the link.
* [Test Page]

It gets created as "Test%20Page" (in the URL and on disk).


Now try to reference it from another page with:
* [TestPage] 
* or if CamelCase is enabled, just TestPage

The link offers to create a new page for you!  Do so.

Now you have TWO different pages "Test Page" and "TestPage".

ICK.

Regards,
John Volkar



-----Original Message-----
From: Murray Altheim [mailto:murray08@altheim.com] 
Sent: Monday, December 08, 2008 7:39 PM
To: jspwiki-dev@incubator.apache.org
Subject: Re: WikiName

Janne Jalkanen wrote:
> Folks,
> 
> I just checked in a new class called WikiName (in the 
> *.content-package) into the JSPWIKI_JCR_BRANCH.  The point of this 
> class is to make it easier to support a multiwiki/subpage setup (so 
> that we don't have to keep parsing/reparsing the paths in String 
> format).  It's a fairly straightforward thing to add transparent
support to WikiPage as well.
> 
> Since it's not really that dependent on JCR itself, I'm wondering if 
> it would make sense to check it into the trunk as well.  Could you 
> please check if it's a good or a bad idea, and whether it's ok to add 
> to the trunk - and most importantly, would it make your life easier or
harder?
> [I would imagine this would make Andrew's job easier at least.]

Janne,

I haven't had a chance to check out any recent code, but one of the
issues I brought up a loooonng time ago now when the change occurred was
the new "feature" that permitted whitespace in WikiNames. This has been
no end of a hassle with users, as they *often* create pages with
whitespace in them (accidentally or deliberately), and then have
difficulties referring to the pages, or end up with two pages, one with
and one without the space (e.g., "JohnSmith" and "John Smith"
/ "John%20Smith"). I find myself fixing page names and trying to explain
what is going on. I never had difficulty explaining camelcase names.

What I'd love to see would be some utility in the new class to either
normalise the names in either direction (to either permit or prohibit
whitespace), or a flag that when true simply eliminated the whitespace
on the name parameter in the constructor.

The presence of whitespace in page names will (to my mind) be only made
worse with the possibility of whitespace in path/directory/ namespace
names. Users generally do not want to deal with these kinds of issues,
and they have a heck of a time with "%20" showing up in paths and URLs
that they sometimes have to type or otherwise share with others.

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

Re: WikiName

Posted by Murray Altheim <mu...@altheim.com>.
Janne Jalkanen wrote:
> Folks,
> 
> I just checked in a new class called WikiName (in the *.content-package) 
> into the JSPWIKI_JCR_BRANCH.  The point of this class is to make it 
> easier to support a multiwiki/subpage setup (so that we don't have to 
> keep parsing/reparsing the paths in String format).  It's a fairly 
> straightforward thing to add transparent support to WikiPage as well.
> 
> Since it's not really that dependent on JCR itself, I'm wondering if it 
> would make sense to check it into the trunk as well.  Could you please 
> check if it's a good or a bad idea, and whether it's ok to add to the 
> trunk - and most importantly, would it make your life easier or harder?  
> [I would imagine this would make Andrew's job easier at least.]

Janne,

I haven't had a chance to check out any recent code, but one of the
issues I brought up a loooonng time ago now when the change occurred
was the new "feature" that permitted whitespace in WikiNames. This
has been no end of a hassle with users, as they *often* create pages
with whitespace in them (accidentally or deliberately), and then
have difficulties referring to the pages, or end up with two pages,
one with and one without the space (e.g., "JohnSmith" and "John Smith"
/ "John%20Smith"). I find myself fixing page names and trying to
explain what is going on. I never had difficulty explaining camelcase
names.

What I'd love to see would be some utility in the new class to either
normalise the names in either direction (to either permit or prohibit
whitespace), or a flag that when true simply eliminated the whitespace
on the name parameter in the constructor.

The presence of whitespace in page names will (to my mind) be only
made worse with the possibility of whitespace in path/directory/
namespace names. Users generally do not want to deal with these
kinds of issues, and they have a heck of a time with "%20" showing
up in paths and URLs that they sometimes have to type or otherwise
share with others.

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