Name

anonref — Moves an anonymous packet into the packet tree

Synopsis

Content Model
anonref ::= ((container|textdata|script|attachment|
              tri|link|snappeadata|
              angles|surfaces|hypersurfaces|
              filtercomb|filterprop|filtertrivial|
              anon|anonref)*)
Attributes
NameType
idCDATA (required)

Added in Regina 7.0

Description

This element has the effect of moving an anonymous packet into the packet tree, effectively “de-anonymising” it.

The id attribute must be the ID of an anonymous packet P that appears before this list in the packet tree, with respect to a pre-order depth-first traversal (i.e., P must appear before this anonref in the XML data file). Recall that an anonymous packet is one that appears anywhere inside an anon element within the data file.

The effect will be to move P to this location in the packet tree. Any child elements of this anonref will become child packets of P. Both the ID and label of P will be preserved. The packet P will no longer be anonymous: the user will see it as part of their data file, just like any other “ordinary” packet.

The reason for using an anonref might be if the user has placed a packet towards the end of the packet tree, but the XML parser needs to see its contents earlier. An example of this is a normal surface list whose triangulation appears after it in a depth-first tree traversal. In this case the triangulation would need to be written before the normal surface list as an anonymous packet (since the normal surface list needs to see it as it is being parsed), and would then be moved using an anonref to its correct location in the tree later on.

If an anonref appears anywhere inside an anon element, then the anonref will have no effect. If the id attribute refers to a packet that is not anonymous (including one that has already been de-anonymised through some other anonref), then this anonref will be ignored.

Any tags associated with the packet P should be included as child tag elements of this anonref, not within the original anon section of the data file.

There are several child XML elements that are common to all packet types. The tag elements represent an arbitrary set of string “tags” that users can attach to a packet to help organise their data. The remaining child elements list all of Regina's packet types (container, textdata, etc.), and these represent the immediate children of this packet in the packet tree.

Parents

The following elements can contain any packet element (including this): angles, anon, anonref, attachment, container, filtercomb, filterprop, filtertrivial, hypersurfaces, link, regina, script, snappeadata, surfaces, textdata, tri. This list includes all packet types, as well as the top-level element regina.

Children

The following children can occur in all packet elements: angles, anon, anonref, attachment, container, filtercomb, filterprop, filtertrivial, hypersurfaces, link, script, snappeadata, surfaces, tag, textdata, tri. This list includes all packet types, as well as the tag element for tagging individual packets.

Attributes

id

The ID of the anonymous packet that we are moving into the packet tree. This must match the id attribute of a packet that appears before this anonref in a pre-order depth-first traversal of the full packet tree.