(filename, options, func)
| 1690 | } |
| 1691 | |
| 1692 | function readXmlFileWithBody(filename, options, func) { |
| 1693 | var readRelationshipsFromZipFile = xmlFileReader({ |
| 1694 | filename: relationshipsFilename(filename), |
| 1695 | readElement: relationshipsReader.readRelationships, |
| 1696 | defaultValue: relationshipsReader.defaultValue |
| 1697 | }); |
| 1698 | |
| 1699 | return readRelationshipsFromZipFile(options.docxFile).then(function(relationships) { |
| 1700 | var bodyReader = new createBodyReader({ |
| 1701 | relationships: relationships, |
| 1702 | contentTypes: options.contentTypes, |
| 1703 | docxFile: options.docxFile, |
| 1704 | numbering: options.numbering, |
| 1705 | styles: options.styles, |
| 1706 | files: options.files |
| 1707 | }); |
| 1708 | return readXmlFromZipFile(options.docxFile, filename) |
| 1709 | .then(function(xml) { |
| 1710 | return func(bodyReader, xml); |
| 1711 | }); |
| 1712 | }); |
| 1713 | } |
| 1714 | |
| 1715 | function relationshipsFilename(filename) { |
| 1716 | var split = zipfile.splitPath(filename); |
no test coverage detected