[xwiki-devs] [Proposal] Sepcifying query string and anchor in link references to documents for XWiki Syntax 2.1
Hi, The discussion started in http://xwiki.markmail.org/thread/hqvmy34jfknb2waa but since it's an important decision I'm making it a full thread here. The idea is to know how we want to represent query string and anchors in links to documents in XWiki Syntax 2.1. In 2.0 we were using: [[label>>whatever?queryString#anchor]] The proposal is to move query string and anchor to a link parameter. It be done like this: [[label>>doc:mypage||parameters="a=b&c=d" anchor="..."]] We could decide to use another syntax for parameters (ie query string) such as: [[label>>doc:mypage||parameters="a=b,c=d" anchor="..."]] This would make it a little bit less URL-specific. The pros of this approach are: - no need for the user to escape the ? and # characters in document names - makes the syntax a little bit less "magic" and more formal The cons: - Takes a bit longer to write - A new syntax to learn WDYT? Thanks -Vincent
On Mon, Sep 20, 2010 at 15:10, Vincent Massol <[email protected]> wrote:
Hi,
The discussion started in http://xwiki.markmail.org/thread/hqvmy34jfknb2waa but since it's an important decision I'm making it a full thread here.
The idea is to know how we want to represent query string and anchors in links to documents in XWiki Syntax 2.1.
In 2.0 we were using: [[label>>whatever?queryString#anchor]]
The proposal is to move query string and anchor to a link parameter.
It be done like this:
[[label>>doc:mypage||parameters="a=b&c=d" anchor="..."]]
We could decide to use another syntax for parameters (ie query string) such as:
[[label>>doc:mypage||parameters="a=b,c=d" anchor="..."]]
This would make it a little bit less URL-specific.
The pros of this approach are: - no need for the user to escape the ? and # characters in document names
? and # no but the content of "parameters" attribute will need an escaping syntax (either the URL one or another one if we decide to choose another syntax)
- makes the syntax a little bit less "magic" and more formal
The cons: - Takes a bit longer to write - A new syntax to learn
WDYT?
+1 for the idea in general but not sure about the proper syntax for "parameters" attribute
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On Sep 20, 2010, at 3:10 PM, Vincent Massol wrote:
Hi,
The discussion started in http://xwiki.markmail.org/thread/hqvmy34jfknb2waa but since it's an important decision I'm making it a full thread here.
The idea is to know how we want to represent query string and anchors in links to documents in XWiki Syntax 2.1.
In 2.0 we were using: [[label>>whatever?queryString#anchor]]
The proposal is to move query string and anchor to a link parameter.
It be done like this:
[[label>>doc:mypage||parameters="a=b&c=d" anchor="..."]]
We could decide to use another syntax for parameters (ie query string) such as:
[[label>>doc:mypage||parameters="a=b,c=d" anchor="..."]]
Actually I think we have 2 options only: 1) [[label>>doc:mypage||queryString="a=b&c=d" anchor="..."]] 2) [[label>>doc:mypage||parameters="a=b,c=d" anchor="..."]] 1) means we consider that all renderers will only deal with URLs, which is probably true in practice but not 100% sure... 2) is more neutral and doesn't imply URL but may be less natural to users used to HTML/HTTP. WDYT? Thanks -Vincent
This would make it a little bit less URL-specific.
The pros of this approach are: - no need for the user to escape the ? and # characters in document names - makes the syntax a little bit less "magic" and more formal
The cons: - Takes a bit longer to write - A new syntax to learn
WDYT?
Thanks -Vincent
Hi Vincent, On 09/20/2010 03:10 PM, Vincent Massol wrote:
Hi,
The discussion started in http://xwiki.markmail.org/thread/hqvmy34jfknb2waa but since it's an important decision I'm making it a full thread here.
The idea is to know how we want to represent query string and anchors in links to documents in XWiki Syntax 2.1.
In 2.0 we were using: [[label>>whatever?queryString#anchor]]
The proposal is to move query string and anchor to a link parameter.
Normally +1 BUT I am quite unsure about having this special syntax only for document links. It might be a bit confusing with the fact that other types of links (relative or url) will have a different way of specifying params. Then again, document link is a document reference while url or relative is definitely an http link.
It be done like this:
[[label>>doc:mypage||parameters="a=b&c=d" anchor="..."]]
We could decide to use another syntax for parameters (ie query string) such as:
[[label>>doc:mypage||parameters="a=b,c=d" anchor="..."]]
while I do understand why it's better to have an abstraction from http parameters, I think it would be confusing otherwise, because users would tend to escape that by URL rules which doesn't escape comma for example. However, since this is only for advanced users in advanced cases, I would say any syntax would do, users would learn it and get used to it. Thanks, Anca
This would make it a little bit less URL-specific.
The pros of this approach are: - no need for the user to escape the ? and # characters in document names - makes the syntax a little bit less "magic" and more formal
The cons: - Takes a bit longer to write - A new syntax to learn
WDYT?
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
ok, after discussing this with Thomas, here's our new proposal below. First some terminology: [[label>>target||params]] Rules: * This is for XWiki Syntax 2.1 only * The target part is there to specify what the link is targeting. QueryString and Anchors do not serve to specify the target. They're just used at render time to control the display. Hence the rationale why they are specified as link params and not as part of the target. Note that for an interwiki link, the interwiki alias is part of the target since it serves to specify the target. * We name the param "queryString" so that it's clear what it is. We can always change it later on with no backward compat issues if we want something more isolated from URLs but we don't see the need now. The user has to write a valid query string including any URL-encoding required. * Example: [[label>>doc:docReference||queryString="a=b&c=d" anchor="anchor"]] I'm going to start implementing this now. Please comment quickly if you don't agree. Thanks a lot -Vincent On Sep 20, 2010, at 3:10 PM, Vincent Massol wrote:
Hi,
The discussion started in http://xwiki.markmail.org/thread/hqvmy34jfknb2waa but since it's an important decision I'm making it a full thread here.
The idea is to know how we want to represent query string and anchors in links to documents in XWiki Syntax 2.1.
In 2.0 we were using: [[label>>whatever?queryString#anchor]]
The proposal is to move query string and anchor to a link parameter.
It be done like this:
[[label>>doc:mypage||parameters="a=b&c=d" anchor="..."]]
We could decide to use another syntax for parameters (ie query string) such as:
[[label>>doc:mypage||parameters="a=b,c=d" anchor="..."]]
This would make it a little bit less URL-specific.
The pros of this approach are: - no need for the user to escape the ? and # characters in document names - makes the syntax a little bit less "magic" and more formal
The cons: - Takes a bit longer to write - A new syntax to learn
WDYT?
Thanks -Vincent
participants (3)
-
Anca Luca -
Thomas Mortagne -
Vincent Massol