Hi,

I am looking for a way to create a document reference without the “hassle” of 
worrying about the WikiName. In a listener, I get a document name which I use 
for input in a query. The result is a list of documentNames in the format 
[space.docname]. I need to transform this into a DocumentReference. I can do 
this without using the wiki, but this gives me “wiki” as the default Wiki. I 
gate get the wiki from (e.g.) the context, but this means I have to do - as far 
as I know - one of the two following creations:

1 - documentReferenceResolver ( wikiName + “:” + docFullName)

Where docFullName is in the format [space.docname]

2 - new DocumentReference ( wikiName, spaceName, docName)

In this case, I will have to split the fullName string in order to get access 
to the spaceName and the docName. If I use a query that delivers me only the 
pageName, I have the problem of not being able to resolve the spaceName.

I am fairly sure I miss something essential here. Could someone help me out? 
I’m also fine with any answer that gives me a XWikiDocument :-)

With kind regards,

Peter
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to