Are you sure you really want a xar with documents containing html
syntax and not an static HTML export of the wiki ?
On Wed, Sep 22, 2010 at 09:44, Gordon Botha <gordon(a)yilaconsulting.com> wrote:
Hi all
Trying again to get this mail sent through. please see mail below.
Hi all
>
> I would like to Export our XWiki to disk as a XAR, but I want the Page
> Content to be HTML.
>
> I have tried using the Large Wike Export Code Snippet:
>
http://code.xwiki.org/xwiki/bin/view/Snippets/LargeWikiExportSnippet
>
> This works perfectly except I am not managing to use convertSyntax() on the
> "xdoc.content()". Perhaps I am not getting the syntax right (I'm not
very
> good with Java-like)
>
> I have the following as part of the toXML function in the snippet:
>
> // Add SyntaxConversion
> xwriter.startElement("", "HTMLsyntax",
"HTMLsyntax", attributes);
> xdoc.convertSyntax(xhtml/1.0);
xdoc.convertSyntax("xhtml/1.0");
but when you do this you really convert the document which is stored
in the cache and used by everyone so you should clone it before
calling convertSyntax or directly use rendering system but it's a bit
more complex to manipulate even if it would be cleaner in your case,
see
http://code.xwiki.org/xwiki/bin/view/Modules/RenderingModule
xwriter.write(xdoc.getContent())
xwriter.endElement("", "HTMLsyntax",
"HTMLsyntax");
What am I missing? And is there a better way?
Thanx in advance for the help
--
Gordon
--
Gordon
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
--
Thomas Mortagne