On Sun, Jan 11, 2009 at 1:02 PM, Sergiu Dumitriu <sergiu(a)xwiki.com> wrote:
asiri (SVN) wrote:
Author: asiri
Date: 2009-01-11 06:57:24 +0100 (Sun, 11 Jan 2009)
New Revision: 15301
Modified:
platform/core/trunk/xwiki-officeimporter/src/main/java/org/xwiki/officeimporter/OfficeImporterContext.java
Log:
XWIKI-3083: Develop the initial feature set for the Office Importer
module
* Minor refactoring.
Modified:
platform/core/trunk/xwiki-officeimporter/src/main/java/org/xwiki/officeimporter/OfficeImporterContext.java
===================================================================
---
platform/core/trunk/xwiki-officeimporter/src/main/java/org/xwiki/officeimporter/OfficeImporterContext.java
2009-01-11 05:09:39 UTC (rev 15300)
+++
platform/core/trunk/xwiki-officeimporter/src/main/java/org/xwiki/officeimporter/OfficeImporterContext.java
2009-01-11 05:57:24 UTC (rev 15301)
@@ -24,6 +24,8 @@
import java.util.Map;
import org.xwiki.bridge.DocumentAccessBridge;
+import org.xwiki.rendering.parser.Syntax;
+import org.xwiki.rendering.parser.SyntaxType;
import com.artofsolving.jodconverter.DefaultDocumentFormatRegistry;
import com.artofsolving.jodconverter.DocumentFormat;
@@ -39,6 +41,11 @@
public class OfficeImporterContext
{
/**
+ * Default document syntax id.
+ */
+ private static final String DEFAULT_SYNTAX_ID = new
Syntax(SyntaxType.XWIKI,
"1.0").toIdString();
Why 1.0? Shouldn't we chose 2.0 as the default?
This is how the DefaultDocumentAccessBridge#setDocumentContent() works:
public void setDocumentContent(String documentName, String content, String
editComment,
boolean isMinorEdit) throws Exception
{
XWikiContext xcontext = getContext();
XWikiDocument doc = xcontext.getWiki().getDocument(documentName,
xcontext);
doc.setContent(content);
xcontext.getWiki().saveDocument(doc, editComment, isMinorEdit,
xcontext);
}
So the document syntax is xwiki 1.0 (because getDocument by default creates
a 1.0 doc). Should we change this to 2.0?
XWiki/1.0 syntax is required for presentation imports.
Thanks.
- Asiri
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs