document name with "." in it?

4 messages Options
Embed this post
Permalink
Pascal Voitot

document name with "." in it?

Reply Threaded More More options
Print post
Permalink
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"

is it possible to do that?

Pascal
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Asiri Rathnayake

Re: document name with "." in it?

Reply Threaded More More options
Print post
Permalink
Hi,

On Sun, Jul 5, 2009 at 3:04 PM, Pascal Voitot
<[hidden email]>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 :(

- Asiri


>
>
> is it possible to do that?
>
> Pascal
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Pascal Voitot

Re: document name with "." in it?

Reply Threaded More More options
Print post
Permalink
On Mon, Jul 6, 2009 at 7:26 AM, Asiri Rathnayake <[hidden email]
> wrote:

> Hi,
>
> On Sun, Jul 5, 2009 at 3:04 PM, Pascal Voitot
> <[hidden email]>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!

Thks
Pascal


>
> - Asiri
>
>
> >
> >
> > is it possible to do that?
> >
> > Pascal
> > _______________________________________________
> > devs mailing list
> > [hidden email]
> > http://lists.xwiki.org/mailman/listinfo/devs
> >
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
vmassol

Re: document name with "." in it?

Reply Threaded More More options
Print post
Permalink

On Jul 6, 2009, at 12:13 PM, Pascal Voitot wrote:

> On Mon, Jul 6, 2009 at 7:26 AM, Asiri Rathnayake <[hidden email]
>> wrote:
>
>> Hi,
>>
>> On Sun, Jul 5, 2009 at 3:04 PM, Pascal Voitot
>> <[hidden email]>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
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs