NamespacePrefixes

class NamespacePrefixes
%3 NamespacePrefixes NamespacePrefixes syside.NamespacePrefixes OwnedChildrenNodes OwnedChildrenNodes syside.OwnedChildrenNodes OwnedChildrenNodes->NamespacePrefixes ChildrenNodes ChildrenNodes syside.ChildrenNodes ChildrenNodes->OwnedChildrenNodes ChildrenNodesView ChildrenNodesView syside.ChildrenNodesView ChildrenNodesView->ChildrenNodes
Members defined in NamespacePrefixes (3 members)

append

Append a new owned or referenced element, inferred from the relationship type and this container. Returns a pair of (relationship, element), only the relationship is newly constructed.

insert

Insert a relationship and a related element at the specified index. The related element may be owned or referenced depending on the relationship type and this container, see append for more details.

replace

Replace the relationship and its related element at the specified index. The relationship may be reused if its type matches the current relationship at that index. The related element may be owned or referenced depending on the relationship type and this container, see append for more details.

Members inherited from OwnedChildrenNodes (0 members)
Members inherited from ChildrenNodes (8 members)

clear

Clear all nodes from this container. Size is reset to 0 afterwards.

extract

Extracts and returns the element from this container at the specified index without clearing its subtree. The relationship may be reused internally when constructing a new relationship of the same type, while the related element will not.

extract_element

Extracts a related element from this container without clearing its subtree.

extract_with_relationship

Removes a relationship and extracts its related element from this container without clearing its subtree.

pop

Removes and returns a pair (relationship, element) from this container at the specified index. The relationship may be reused internally when constructing a new relationship of the same type, while the related element will only be reused if it was and owned related element. In this case, the related element may be assigned to a new owner in the same document. Note that removed owned related elements will have all the elements in the subtree removed as well.

remove_element

Removes a related element from this container. Returns True if the related element was removed, and False otherwise. Note that removed owned related elements will have all the elements in the subtree removed as well.

remove_relationship

Removes a relationship and its related element from this container. Returns True if the relationship was removed, and False otherwise. Note that removed owned related elements will have all the elements in the subtree removed as well.

reserve

Increase the capacity of the container. Size is not changed.

Members inherited from ChildrenNodesView (6 members)

elements

R

The related elements in this container.

relationships

R

The relationships in this container.

__bool__

__getitem__

__len__

at

Methods

append(relationship: type[syside.NamespacePrefixes.append.R], element: syside.NamespacePrefixes.append.M, name: syside.NameID = ...) tuple[syside.NamespacePrefixes.append.R, syside.NamespacePrefixes.append.M]

Append a new owned or referenced element, inferred from the relationship type and this container. Returns a pair of (relationship, element), only the relationship is newly constructed.

append(relationship: type[syside.NamespacePrefixes.append.R], element: type[syside.NamespacePrefixes.append.M]) tuple[syside.NamespacePrefixes.append.R, syside.NamespacePrefixes.append.M]

Append a new owned element. Relationship must be a subtype of OwningMembership or Annotation. Returns a newly constructed pair of (relationship, element) with the types provided.

insert(index: int, relationship: type[syside.NamespacePrefixes.insert.R], element: syside.NamespacePrefixes.insert.M, name: syside.NameID = ...) tuple[syside.NamespacePrefixes.insert.R, syside.NamespacePrefixes.insert.M]

Insert a relationship and a related element at the specified index. The related element may be owned or referenced depending on the relationship type and this container, see append for more details.

insert(index: int, relationship: type[syside.NamespacePrefixes.insert.R], element: type[syside.NamespacePrefixes.insert.M]) tuple[syside.NamespacePrefixes.insert.R, syside.NamespacePrefixes.insert.M]

Insert a relationship and a related element at the specified index. The related element must be owned so the same owning append limitations apply.

replace(index: int, relationship: type[syside.NamespacePrefixes.replace.R], element: syside.NamespacePrefixes.replace.M, name: syside.NameID = ...) tuple[syside.NamespacePrefixes.replace.R, syside.NamespacePrefixes.replace.M]

Replace the relationship and its related element at the specified index. The relationship may be reused if its type matches the current relationship at that index. The related element may be owned or referenced depending on the relationship type and this container, see append for more details.

replace(index: int, relationship: type[syside.NamespacePrefixes.replace.R], element: type[syside.NamespacePrefixes.replace.M]) tuple[syside.NamespacePrefixes.replace.R, syside.NamespacePrefixes.replace.M]

Replace the relationship and its related element at the specified index. The relationship may be reused if its type matches the current relationship at that index. The related element must be owned so the same owning append limitations apply.

Used in