+ $area.append(pageEditor);
+};
+
+Rakka.submitTextPage = function (baseURI, pageName, oldRevision, givenPageName, mimeType, text) {
+ var doc = document.implementation.createDocument(
+ "http://cielonegro.org/schema/Rakka/Page/1.0", "page", null);
+
+ var page = doc.documentElement;
+
+ if (oldRevision != null) {
+ // ページ書換時
+ var updateInfo = doc.createElement("updateInfo");
+ updateInfo.setAttribute("oldRevision", oldRevision);
+
+ if (pageName != givenPageName) {
+ var move = doc.createElement("move");
+ move.setAttribute("from", pageName);
+ updateInfo.appendChild(move);
+ }
+
+ page.appendChild(updateInfo);
+ }
+
+ if (0) {
+ // redirection
+ }
+ else {
+ page.setAttribute("type", mimeType);
+
+ var textData = doc.createElement("textData");
+ textData.appendChild(
+ doc.createTextNode(text));
+
+ page.appendChild(textData);
+ }
+
+ $.ajax({
+ type : "PUT",
+ url : baseURI + encodeURI(givenPageName),
+ contentType: "text/xml",
+ data : doc,
+ processData: false
+ });