Add file relationships

This commit is contained in:
Dolan Miu
2018-02-04 00:58:34 +00:00
parent 69707a7207
commit 23c5aef276
5 changed files with 32 additions and 18 deletions

View File

@ -10,7 +10,10 @@ export type RelationshipType =
| "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings"
| "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering"
| "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header"
| "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer";
| "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer"
| "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"
| "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"
| "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties";
export class Relationship extends XmlComponent {
constructor(id: string, type: RelationshipType, target: string) {

View File

@ -10,11 +10,6 @@ export class Relationships extends XmlComponent {
xmlns: "http://schemas.openxmlformats.org/package/2006/relationships",
}),
);
this.createRelationship(1, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles", "styles.xml");
this.createRelationship(2, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering", "numbering.xml");
this.createRelationship(3, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", "header1.xml");
this.createRelationship(4, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", "footer1.xml");
}
public addRelationship(relationship: Relationship): void {