anonref

5reg

anonref

Moves an anonymous packet into the packet tree

Content Model
    anonref ::= (&packetsyn1;
                 &packetsyn2;
                 &packetsyn3;
                 &packetsyn4;
                 &packetsyn5;*)
Attributes
Name | Type
`id` | `CDATA` (required)

&eltaddedver;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 &xml-anonref; in the &xml; data file). Recall that an anonymous packet is one that appears anywhere inside an &xml-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 &xml-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 &xml-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 &xml-anonref; to its correct location in the tree later on.

If an &xml-anonref; appears anywhere inside an &xml-anon; element, then the &xml-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 &xml-anonref;), then this &xml-anonref; will be ignored.

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

&packetchilddesc;

### Parents

&packetparents;

### Children

&packetchildren;

## 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 &xml-anonref; in a pre-order depth-first traversal of the full packet tree.