On Jul 6, 2009, at 12:13 PM, Pascal Voitot wrote: > On Mon, Jul 6, 2009 at 7:26 AM, Asiri Rathnayake <[email protected] >> wrote: > >> Hi, >> >> On Sun, Jul 5, 2009 at 3:04 PM, Pascal Voitot >> <[email protected]>wrote: >> >>> Hello, >>> >>> For example, I have a space "Space" >>> and I want to create a doc "mydoc.name" in it >>> I do xwiki.getDocument("Space.mydoc.name") >>> >>> but it creates a space "Space.mydoc" and a doc with name "name" >> >> >> AFAIK if you create a document like >> "a.long.document.name.separated.by.dots" xwiki will treat all the >> characters >> up to the final dot (".") as the space name and the rest as the >> page name. >> I >> don't think there is a way to overcome this behaviour :( >> > > exactly the behaviour I discovered... > I would have prefered that it stops to the first "." it finds > because this > is what I need :):):):) > Anyway if anyone has a quick solution, I would be glad to know it!
You could set the space name and the page name explicitely: $mydoc.setName()/setSpace() However just noticed these are restricted APIs for which you need programming rights... So I don't see an easy way to do what you want right now. In some not too far future we'll allow escaping chars in doc names + we're considering changing the way to reference a doc using a string to allow for nested spaces. Something like: wiki://space1/space2/my.document.with.dots Thanks -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

