(element)
| 1452 | |
| 1453 | |
| 1454 | function readContentTypesFromXml(element) { |
| 1455 | var extensionDefaults = {}; |
| 1456 | var overrides = {}; |
| 1457 | |
| 1458 | element.children.forEach(function(child) { |
| 1459 | if (child.name === "content-types:Default") { |
| 1460 | extensionDefaults[child.attributes.Extension] = child.attributes.ContentType; |
| 1461 | } |
| 1462 | if (child.name === "content-types:Override") { |
| 1463 | var name = child.attributes.PartName; |
| 1464 | if (name.charAt(0) === "/") { |
| 1465 | name = name.substring(1); |
| 1466 | } |
| 1467 | overrides[name] = child.attributes.ContentType; |
| 1468 | } |
| 1469 | }); |
| 1470 | return contentTypes(overrides, extensionDefaults); |
| 1471 | } |
| 1472 | |
| 1473 | function contentTypes(overrides, extensionDefaults) { |
| 1474 | return { |
nothing calls this directly
no test coverage detected