rel – OfficeDissector - Relationship Class

A Relationship in an OOXML Document.

class officedissector.rel.Relationship(source, type, id, target, target_part, is_external)

A Relationship in an OOXML Document.

Variables:
  • source – The source of a Relationship. For example, a Relationship in the ‘/word/_rels/document.xml.rels’ Part has the source: ‘/word/document.xml’. For Relationships in the ‘/_rels/.rels’ Part, the source is the virtual root part, or RootPart.
  • type – The Type of a Relationship. For example, the Relationship with the Target ‘/word/document.xml’ is Type: ‘http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument
  • id – The unique ID for this Relationship object. Note that the ID is unique only in that particular .rels file. The ID may be reused in another .rels file.
  • target – The URI of the relationship’s target (e.g. footnotes.xml)
  • target_part – A reference to the target Part object.
  • is_external – True if the Target of the Relationship refers to an external resource (eg. a hyperlink).
__init__(source, type, id, target, target_part, is_external)
to_json()

Export this object to JSON.

Returns:a JSON encoded string
to_reference()

Return a string which uniquely identifies this object.

Returns:a string which uniquely identifies this object

Previous topic

part – OfficeDissector - Part Class

Next topic

zip – OfficeDissector - Zip Class

This Page