Class: Uniword::Ooxml::Relationships::PackageRelationships

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/uniword/ooxml/relationships/package_relationships.rb

Overview

Package-level Relationships root element (for _rels/.rels)

Uses package namespace: schemas.openxmlformats.org/package/2006/relationships

Class Method Summary collapse

Class Method Details

.generate_package_relsPackageRelationships

Generates relationship files (.rels) for DOCX packages

Generate package-level .rels file

Returns:



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/uniword/ooxml/relationships/package_relationships.rb', line 27

def self.generate_package_rels
  new(
    relationships: [
      PackageRelationship.new(
        id: "rId3",
        type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",
        target: "docProps/app.xml",
      ),
      PackageRelationship.new(
        id: "rId2",
        type: "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",
        target: "docProps/core.xml",
      ),
      PackageRelationship.new(
        id: "rId1",
        type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",
        target: "word/document.xml",
      ),
    ],
  )
end