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 _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

