Revision b51df436 webodf/odf.html
| b/webodf/odf.html | ||
|---|---|---|
| 1 | 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| 2 | 2 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 3 | 3 |
<head> |
| 4 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
|
|
| 4 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
|
| 5 | 5 |
<style type="text/css" media="screen"> |
| 6 | 6 |
body, html, div {
|
| 7 | 7 |
padding: 0px; |
| ... | ... | |
| 108 | 108 |
|
| 109 | 109 |
clear(document.body); |
| 110 | 110 |
|
| 111 |
var stylesxmlnode = container.getXmlNode('styles.xml');
|
|
| 112 |
var contentxmlnode = container.getXmlNode('content.xml');
|
|
| 113 |
if (!stylesxmlnode || !stylesxmlnode.documentElement) {
|
|
| 114 |
throw "No styles element found."; |
|
| 115 |
} |
|
| 116 |
if (!contentxmlnode || !contentxmlnode.documentElement) {
|
|
| 117 |
throw "No content element found."; |
|
| 118 |
} |
|
| 119 |
stylesxmlnode = document.importNode(stylesxmlnode.documentElement, true); |
|
| 120 |
contentxmlnode = document.importNode(contentxmlnode.documentElement, true); |
|
| 121 |
handleStyles(stylesxmlnode, contentxmlnode); |
|
| 122 |
|
|
| 123 |
// do content last, because otherwise the document is constantly updated |
|
| 124 |
// whenever the css changes |
|
| 125 |
handleContentXmlLoaded(contentxmlnode); |
|
| 111 |
container.getXmlNode('styles.xml', function(stylesxmlnode) {
|
|
| 112 |
container.getXmlNode('content.xml', function(contentxmlnode) {
|
|
| 113 |
if (!stylesxmlnode || !stylesxmlnode.documentElement) {
|
|
| 114 |
throw "No styles element found."; |
|
| 115 |
} |
|
| 116 |
if (!contentxmlnode || !contentxmlnode.documentElement) {
|
|
| 117 |
throw "No content element found."; |
|
| 118 |
} |
|
| 119 |
stylesxmlnode = document.importNode(stylesxmlnode.documentElement, true); |
|
| 120 |
contentxmlnode = document.importNode(contentxmlnode.documentElement, true); |
|
| 121 |
handleStyles(stylesxmlnode, contentxmlnode); |
|
| 122 |
|
|
| 123 |
// do content last, because otherwise the document is constantly updated |
|
| 124 |
// whenever the css changes |
|
| 125 |
handleContentXmlLoaded(contentxmlnode); |
|
| 126 |
}); |
|
| 127 |
}); |
|
| 126 | 128 |
} |
| 127 | 129 |
|
| 128 | 130 |
var officens = "urn:oasis:names:tc:opendocument:xmlns:office:1.0"; |
Also available in: Unified diff