From ad462dfe10fbaceaebf59a4769620f64cc8dbeee Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Mon, 27 Mar 2017 01:28:52 +0100 Subject: [PATCH] added relationships --- ts/relationships/attributes.ts | 11 +++++++++++ ts/relationships/index.ts | 14 ++++++++++++++ ts/relationships/relationship.ts | 0 3 files changed, 25 insertions(+) create mode 100644 ts/relationships/attributes.ts create mode 100644 ts/relationships/index.ts create mode 100644 ts/relationships/relationship.ts diff --git a/ts/relationships/attributes.ts b/ts/relationships/attributes.ts new file mode 100644 index 0000000000..4aae08248d --- /dev/null +++ b/ts/relationships/attributes.ts @@ -0,0 +1,11 @@ +import { XmlAttributeComponent } from "../docx/xml-components"; + +interface IRelationshipsAttributesProperties { + xmlns: string; +} + +export class RelationshipsAttributes extends XmlAttributeComponent { + protected xmlKeys = { + xmlns: "xmlns", + }; +} diff --git a/ts/relationships/index.ts b/ts/relationships/index.ts new file mode 100644 index 0000000000..e2c27f36e8 --- /dev/null +++ b/ts/relationships/index.ts @@ -0,0 +1,14 @@ +import { XmlComponent } from "../docx/xml-components"; +import { RelationshipsAttributes } from "./attributes"; + +export class Relationships extends XmlComponent { + + constructor() { + super("Relationships"); + this.root.push(new RelationshipsAttributes({ + xmlns: "http://schemas.openxmlformats.org/package/2006/relationships", + })); + + // this.root.push(new Created()); + } +} diff --git a/ts/relationships/relationship.ts b/ts/relationships/relationship.ts new file mode 100644 index 0000000000..e69de29bb2