blob: 9d202baba2c9389728e74223deb61822e1c791f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
var assert = require("assert");
var xml = require("../../lib/xml");
var officeXmlReader = require("../../lib/docx/office-xml-reader");
var test = require("../testing").test;
describe("office-xml-reader", function() {
test("mc:AlternateContent is replaced by contents of mc:Fallback", function() {
var xmlString =
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' +
'<numbering xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">' +
'<mc:AlternateContent>' +
'<mc:Choice Requires="w14">' +
'<choice/>' +
'</mc:Choice>' +
'<mc:Fallback>' +
'<fallback/>' +
'</mc:Fallback>' +
'</mc:AlternateContent>' +
'</numbering>';
return officeXmlReader.read(xmlString).then(function(element) {
assert.deepEqual(element.root.children, [xml.element("fallback")]);
});
});
});
|