Hi,

You did not mention how you are doing the "conversion". Are you using the
rendering script service?

Anyway, one thing I can think of is to set the context document before
starting the conversion process. Here is a snippet that would exemplify
this:

{{velocity}}
$xcontext.doc
$xcontext.setDoc($xwiki.getDocument('Sandbox.WebHome').document)
$xcontext.doc
{{/velocity}}

Note that it requires Programming Right (on the author user) to be able to
be executable.

Hope this helps,
Eduard


On Wed, Oct 7, 2015 at 12:38 PM, Peter Huisman <p.huis...@ximm.nl> wrote:

> Hi,
>
> I am using a conversion from XWiki syntax to XHTML which is working like a
> charm. The challenge I have however is the following:
>
> I am running a (test velocity) script from the Sandbox space. I am
> converting documents in a different space (let’s say AAAA).These documents
> contain objects with textarea’s where the references are in the form of
> [[text>>doc:filename]] since it refers to documents in the AAAA space. The
> conversion of XWiki links is “going down the drain” since the converter is
> using the Sandbox space to resolve the reference to the page and generates
> a create reference to the file.
>
> Is there an easy way to set the (default) space (in either Java or
> Velocity) without having to run the script from the actual space (in this
> case, the AAAA space)?
>
> Br,
>
> Peter
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to