[xwiki-devs] [Proposal] Linking to attachments/Insert link to image with new rendering
Hi, This has been slightly discussed in other thread but not clearly so here's the clear proposal I'd like to implement: 1) Linking to an attachment: [[label>attachment:my.doc]] or simply [[attachment:my.doc]] 2) Image link: [[label>reference>image=my.png]] or simply [[reference>image=my.png]] 3) Linking to an attachment with an image displayed: [[label>attachment:my.doc>image=my.png]] Note 1: In 2) and 3) the label is only used in the HTML "alt" and "title" attributes since the link is on an image. Note 2: The value for attachment:xxx is an attachment name (as in my.doc) or the qualified name of an attachment. I'm proposing "wiki:space.page^attachment" for now. Note 3: The value for image can be: a full URL, an image attachment name (as in my.png) or the qualified name of the image as in: "wiki:space.page^imagename" (same as above). WDYT? Thanks -Vincent
Sounds good to me. One question though : what's happening when a link points to a non-existent attachment ? Should we display a full link leading to nowhere or should we redirect the user to the attachment upload form with a message saying the attachment doesn't exist ? Guillaume On Wed, Sep 3, 2008 at 9:38 PM, Vincent Massol <[email protected]> wrote:
Hi,
This has been slightly discussed in other thread but not clearly so here's the clear proposal I'd like to implement:
1) Linking to an attachment:
[[label>attachment:my.doc]] or simply [[attachment:my.doc]]
2) Image link:
[[label>reference>image=my.png]] or simply [[reference>image=my.png]]
3) Linking to an attachment with an image displayed:
[[label>attachment:my.doc>image=my.png]]
Note 1: In 2) and 3) the label is only used in the HTML "alt" and "title" attributes since the link is on an image.
Note 2: The value for attachment:xxx is an attachment name (as in my.doc) or the qualified name of an attachment. I'm proposing "wiki:space.page^attachment" for now. Note 3: The value for image can be: a full URL, an image attachment name (as in my.png) or the qualified name of the image as in: "wiki:space.page^imagename" (same as above).
WDYT?
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Guillaume Lerouge Product Manager - XWiki Skype ID : wikibc http://blog.xwiki.com/
Hi, Vincent Massol wrote:
Hi,
This has been slightly discussed in other thread but not clearly so here's the clear proposal I'd like to implement:
1) Linking to an attachment:
[[label>attachment:my.doc]] or simply [[attachment:my.doc]]
2) Image link:
[[label>reference>image=my.png]] or simply [[reference>image=my.png]]
3) Linking to an attachment with an image displayed:
[[label>attachment:my.doc>image=my.png]]
Note 1: In 2) and 3) the label is only used in the HTML "alt" and "title" attributes since the link is on an image.
Can I still then add more customized attributes to the link and "misuse" that information for semantic relation of Entities (Pages) as discussed in the other (or yet another one?) Thread? E.g. London Page Content: [[UnitedKingdom>relation="capital of"]] Just wanted to make sure. Thanks and Greetings Jonas
On Sep 4, 2008, at 1:08 AM, Jonas von Malottki wrote:
Hi, Vincent Massol wrote:
Hi,
This has been slightly discussed in other thread but not clearly so here's the clear proposal I'd like to implement:
1) Linking to an attachment:
[[label>attachment:my.doc]] or simply [[attachment:my.doc]]
2) Image link:
[[label>reference>image=my.png]] or simply [[reference>image=my.png]]
3) Linking to an attachment with an image displayed:
[[label>attachment:my.doc>image=my.png]]
Note 1: In 2) and 3) the label is only used in the HTML "alt" and "title" attributes since the link is on an image.
Can I still then add more customized attributes to the link and "misuse" that information for semantic relation of Entities (Pages) as discussed in the other (or yet another one?) Thread?
E.g. London Page Content: [[UnitedKingdom>relation="capital of"]]
Just wanted to make sure.
Sure. The generic format is still [[label>reference>param1=value1 param2=value...]] Thanks -Vincent
Thanks and Greetings Jonas _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Hi Vincent, thanks thats Perfect! In which release are you planning this feature? Upcoming 1.6? Greetings Jonas
Can I still then add more customized attributes to the link and "misuse" that information for semantic relation of Entities (Pages) as discussed in the other (or yet another one?) Thread?
E.g. London Page Content: [[UnitedKingdom>relation="capital of"]]
Just wanted to make sure.
Sure. The generic format is still [[label>reference>param1=value1 param2=value...]]
On Sep 4, 2008, at 10:37 AM, Jonas von Malottki wrote:
Hi Vincent,
thanks thats Perfect! In which release are you planning this feature? Upcoming 1.6?
Yes I'd like to have that in 1.6. Thanks -Vincent
Can I still then add more customized attributes to the link and "misuse" that information for semantic relation of Entities (Pages) as discussed in the other (or yet another one?) Thread?
E.g. London Page Content: [[UnitedKingdom>relation="capital of"]]
Just wanted to make sure.
Sure. The generic format is still [[label>reference>param1=value1 param2=value...]]
Vincent Massol wrote:
Hi,
This has been slightly discussed in other thread but not clearly so here's the clear proposal I'd like to implement:
1) Linking to an attachment:
[[label>attachment:my.doc]] or simply [[attachment:my.doc]]
2) Image link:
[[label>reference>image=my.png]] or simply [[reference>image=my.png]]
3) Linking to an attachment with an image displayed:
[[label>attachment:my.doc>image=my.png]]
Note 1: In 2) and 3) the label is only used in the HTML "alt" and "title" attributes since the link is on an image.
Note 2: The value for attachment:xxx is an attachment name (as in my.doc) or the qualified name of an attachment. I'm proposing "wiki:space.page^attachment" for now. Note 3: The value for image can be: a full URL, an image attachment name (as in my.png) or the qualified name of the image as in: "wiki:space.page^imagename" (same as above).
WDYT?
'^' symbol in "wiki:space.page^imagename" is unnatural. Can we use '/' instead?: "wiki:space.page/imagename" ? +1 for others. -- Artem Melentyev
On Wed, Sep 3, 2008 at 9:38 PM, Vincent Massol <[email protected]> wrote:
Hi,
This has been slightly discussed in other thread but not clearly so here's the clear proposal I'd like to implement:
1) Linking to an attachment:
[[label>attachment:my.doc]] or simply [[attachment:my.doc]]
Could we use "=" instead of ":" is already used for the wiki prefix (as in xwiki:Main.WebHome) ? To be able to write [label>attachment=xwiki:Main.WebHome^my.doc]
2) Image link:
[[label>reference>image=my.png]] or simply [[reference>image=my.png]]
"reference" is a wiki page here ? If so I'd be in favor of keeping the target element as the last element of the link : [[image=my.png>reference]].
[snip]
Note 2: The value for attachment:xxx is an attachment name (as in my.doc) or the qualified name of an attachment. I'm proposing "wiki:space.page^attachment" for now. Note 3: The value for image can be: a full URL, an image attachment name (as in my.png) or the qualified name of the image as in: "wiki:space.page^imagename" (same as above).
I'm not a fan of "^" or "/" but I don't have any suggestion, choices are very limited!
Jean-Vincent Drean wrote:
On Wed, Sep 3, 2008 at 9:38 PM, Vincent Massol <[email protected]> wrote:
Hi,
This has been slightly discussed in other thread but not clearly so here's the clear proposal I'd like to implement:
1) Linking to an attachment:
[[label>attachment:my.doc]] or simply [[attachment:my.doc]]
Could we use "=" instead of ":" is already used for the wiki prefix (as in xwiki:Main.WebHome) ? To be able to write [label>attachment=xwiki:Main.WebHome^my.doc]
2) Image link:
[[label>reference>image=my.png]] or simply [[reference>image=my.png]]
"reference" is a wiki page here ? If so I'd be in favor of keeping the target element as the last element of the link : [[image=my.png>reference]].
I'm not sure about this, traditionally the target was the second parameter, and I think it would be better to keep it that way: label, target, extra parameters.
[snip]
Note 2: The value for attachment:xxx is an attachment name (as in my.doc) or the qualified name of an attachment. I'm proposing "wiki:space.page^attachment" for now. Note 3: The value for image can be: a full URL, an image attachment name (as in my.png) or the qualified name of the image as in: "wiki:space.page^imagename" (same as above).
I'm not a fan of "^" or "/" but I don't have any suggestion, choices are very limited!
We could also keep ':' as a generic separator, but it will require all links to also include the wiki name. Another more complex idea would be to have something like: part1=value1:part2=value2:part3=value3... For example: space=Space:document=Doc:version=4.2 wiki=incubator:space=Some.Deep.Space:document=Doc:attachment=file.svg:attachmentVersion=1.4 space=SpaceName:document=DocName:attachment=archive.zip:path=/path/inside/archive/index.html Of course, this is the long version, and the short version, if the part name is not specified, is: first part = wiki second part = Space.document third part = attachment -- Sergiu Dumitriu http://purl.org/net/sergiu/
On Sep 4, 2008, at 5:57 PM, Sergiu Dumitriu wrote:
Jean-Vincent Drean wrote:
On Wed, Sep 3, 2008 at 9:38 PM, Vincent Massol <[email protected]> wrote:
Hi,
This has been slightly discussed in other thread but not clearly so here's the clear proposal I'd like to implement:
1) Linking to an attachment:
[[label>attachment:my.doc]] or simply [[attachment:my.doc]]
Could we use "=" instead of ":" is already used for the wiki prefix (as in xwiki:Main.WebHome) ?
The reference supports URI and what I'm proposing is to make attachment an URI similar to mailto:xxx. So the delimiter symbol for URIs is ":".
To be able to write [label>attachment=xwiki:Main.WebHome^my.doc]
2) Image link:
[[label>reference>image=my.png]] or simply [[reference>image=my.png]]
"reference" is a wiki page here ?
reference can be: * a URI * a URL * a wiki page name
If so I'd be in favor of keeping the target element as the last element of the link : [[image=my.png>reference]].
I'm not sure about this, traditionally the target was the second parameter, and I think it would be better to keep it that way: label, target, extra parameters.
The order in XWiki Syntax 1.0 is: label > reference > target I'm proposing to keep that order but to replace target by a generic list of parameters. Actually this proposal doesn't come out of the void. It's the way it's handled by wikimodel and would be very difficult to change. My preference would have been what I had proposed earlier, i.e.: [[wiki syntax here>reference>target]] where wiki syntax can be any valid wiki syntax such as [[{{image:my.png}}>reference]] or [[this is **bold**>reference]] But this is not supported currently by wikimodel and Mikhail says it's too hard to change for now. We could still do it but we'll have lots of problems (which I can explain if someone is interested but it's a bit lengthy) so right now I went to the path of least resistance and which sounds good enough.
[snip]
Note 2: The value for attachment:xxx is an attachment name (as in my.doc) or the qualified name of an attachment. I'm proposing "wiki:space.page^attachment" for now. Note 3: The value for image can be: a full URL, an image attachment name (as in my.png) or the qualified name of the image as in: "wiki:space.page^imagename" (same as above).
I'm not a fan of "^" or "/" but I don't have any suggestion, choices are very limited!
The reason I use ^ was only because this is what is used by Confluence already. I'm open to any character.
We could also keep ':' as a generic separator, but it will require all links to also include the wiki name.
Another more complex idea would be to have something like:
part1=value1:part2=value2:part3=value3...
For example:
space=Space:document=Doc:version=4.2
wiki = incubator:space = Some.Deep.Space:document=Doc:attachment=file.svg:attachmentVersion=1.4
space=SpaceName:document=DocName:attachment=archive.zip:path=/path/ inside/archive/index.html
Of course, this is the long version, and the short version, if the part name is not specified, is:
first part = wiki second part = Space.document third part = attachment
This all ties to the email I had sent about Document identity and how to represent a document name. However since this is for 1.6 final I wanted to do something simple to start with that will use the current document naming, i.e. wiki:Space.Page and just augment it to specify the attachment. We need to think more about how we want to represent document names. I'll need to read again the DocumentName and DocumentNameFactory email on this. Anyway I'm currently finishing definitions lists so I won't have time to work on this before tomorrow and I'll be busy on other things tomorrow (independent of my good will) and till tuesday included so this won't make it for 1.6M2 :( Thus there's a risk this dosn't make it in 1.6, in which case it would be for 1.7. Thanks -Vincent
participants (6)
-
Artem Melentyev -
Guillaume Lerouge -
Jean-Vincent Drean -
Jonas von Malottki -
Sergiu Dumitriu -
Vincent Massol