[xwiki-devs] [Proposal] Choosing a new format for serializing a document's name
Hi, We need to choose a new format for serializing a document name for several reasons: - the current format is ambiguous and doesn't allow too many characters to be entered - it doesn't support nested spaces I'd like to propose the following format: a URL. <wiki>://<space1>/<space2>/.../<spaceN>/<page>?<params>#anchor Examples: * Page * Space/Page * mywiki://Space/Page * mywiki://some/nested/Space/Page * Page?param=value * Page#anchor + the ability to escape chars. For example if the user wants to have the "/" char in a page name he would have: Special~/Page (we can decide what escape char to use) Of course, it'll be the role of the serializer to escape chars as required. Pros of using a URL format: * easy to code since we can reuse the JDK's URL class * URL friendly. It's easy to copy paste the URL of a document into a link. No more needing to translate "." into "/" * it's JCR friendly since JCR also uses "/" for the path to a Node * it's a well known format and users are used to it WDYT? Thanks -Vincent
+1 - Asiri On Tue, May 19, 2009 at 11:36 PM, Vincent Massol <[email protected]> wrote:
Hi,
We need to choose a new format for serializing a document name for several reasons: - the current format is ambiguous and doesn't allow too many characters to be entered - it doesn't support nested spaces
I'd like to propose the following format: a URL.
<wiki>://<space1>/<space2>/.../<spaceN>/<page>?<params>#anchor
Examples:
* Page * Space/Page * mywiki://Space/Page * mywiki://some/nested/Space/Page * Page?param=value * Page#anchor
+ the ability to escape chars. For example if the user wants to have the "/" char in a page name he would have:
Special~/Page
(we can decide what escape char to use)
Of course, it'll be the role of the serializer to escape chars as required.
Pros of using a URL format: * easy to code since we can reuse the JDK's URL class * URL friendly. It's easy to copy paste the URL of a document into a link. No more needing to translate "." into "/" * it's JCR friendly since JCR also uses "/" for the path to a Node * it's a well known format and users are used to it
WDYT?
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On May 19, 2009, at 8:06 PM, Vincent Massol wrote:
+ the ability to escape chars. For example if the user wants to have the "/" char in a page name he would have:
Special~/Page
Maybe we could use the standard %XY way of escaping things so that we could leverage existing libraries that are already able to handle URIs. Anyway +1. -Fabio
On May 19, 2009, at 8:39 PM, Fabio Mancinelli wrote:
On May 19, 2009, at 8:06 PM, Vincent Massol wrote:
+ the ability to escape chars. For example if the user wants to have the "/" char in a page name he would have:
Special~/Page
Maybe we could use the standard %XY way of escaping things so that we could leverage existing libraries that are already able to handle URIs.
yes I thought about it actually but I thought it was too complex to remember. Imagine you want to enter a "?" in a the page name. Do you know the %XY value without looking it up when you're writing in wiki syntax? Thanks -Vincent
On Tue, May 19, 2009 at 20:06, Vincent Massol <[email protected]> wrote:
Hi,
We need to choose a new format for serializing a document name for several reasons: - the current format is ambiguous and doesn't allow too many characters to be entered - it doesn't support nested spaces
I'd like to propose the following format: a URL.
<wiki>://<space1>/<space2>/.../<spaceN>/<page>?<params>#anchor
Examples:
* Page * Space/Page * mywiki://Space/Page * mywiki://some/nested/Space/Page * Page?param=value * Page#anchor
+ the ability to escape chars. For example if the user wants to have the "/" char in a page name he would have:
Special~/Page
If we use URL format we should use URL escaping i think.
(we can decide what escape char to use)
Of course, it'll be the role of the serializer to escape chars as required.
Pros of using a URL format: * easy to code since we can reuse the JDK's URL class * URL friendly. It's easy to copy paste the URL of a document into a link. No more needing to translate "." into "/" * it's JCR friendly since JCR also uses "/" for the path to a Node * it's a well known format and users are used to it
WDYT?
+1000 for the support of escaping in the document name, it will fix a lot a issues we have. +1 for sub spaces support in document name +0.5 for the proposed URL friendly format (need to think more about it)
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
participants (4)
-
Asiri Rathnayake -
Fabio Mancinelli -
Thomas Mortagne -
Vincent Massol