use v6;
role ISO_32000_2::Table_354-Entries_in_the_structure_tree_root {
    method Type {...};
    method K {...};
    method IDTree {...};
    method ParentTree {...};
    method ParentTreeNextKey {...};
    method RoleMap {...};
    method ClassMap {...};
    method Namespaces {...};
    method PronunciationLexicon {...};
    method AF {...};
}

=begin pod

=head1 Description

Table 354 — Entries in the structure tree root

=head1 Methods (Entries)

=head2 Type [name]
- (Required) The type of PDF object that this dictionary describes; is StructTreeRoot for a structure tree root.

=head2 K [dictionary or array]
- (Optional) The immediate child or children of the structure tree root in the structure hierarchy. The value may be either a dictionary representing a single structure element or an array of such dictionaries.

=head2 IDTree [name tree]
- (Required if any structure elements have element identifiers) A name tree (see 7.9.6, "Name trees") that maps element identifiers (see "Table 355 — Entries in a structure element dictionary") to the structure elements they denote.

=head2 ParentTree [number tree]
- (Required if any structure element contains content items) A number tree (see 7.9.7, "Number trees") used in finding the structure elements to which content items belong. Each integer key in the number tree corresponds to a single page of the document or to an individual object (such as an annotation or an XObject) that is a content item in its own right. The integer key is the value of the StructParent or StructParents entry in that object (see 14.7.5.4, "Finding structure elements from content items"). The form of the associated value depends on the nature of the object: For an object that is a content item in its own right, the value is an indirect reference to the object’s parent element (the structure element that contains it as a content item). For a page object or content stream containing marked-content sequences that are content items, the value is an array of references to the parent elements of those marked-content sequences. See 14.7.5.4, "Finding structure elements from content items" for further discussion.

=head2 ParentTreeNextKey [integer]
- (Optional) An integer greater than any key in the parent tree ParentTree and that is used as the key for the next entry added to the parent tree.

=head2 RoleMap [dictionary]
- (Optional) A dictionary that maps name objects designating names of structure types used in the document to a name object designating the name of their approximate equivalents in the set of standard structure types (see 14.8.4, "Standard structure types").

=head2 ClassMap [dictionary]
- (Optional) A dictionary that maps name objects designating attribute classes to the corresponding attribute objects or arrays of attribute objects (see 14.7.6.2, "Attribute classes").

=head2 Namespaces [array]
- (Required if any structure elements have namespace identifiers; PDF 2.0) An array of namespaces used within the document (see 14.7.4.2, "Namespace dictionary").

=head2 PronunciationLexicon [array of file specifications]
- (Optional; PDF 2.0) An array containing one or more indirect references to file specification dictionaries, where each specified file is a pronunciation lexicon, which is an XML file conforming to the Pronunciation Lexicon Specification (PLS) Version 1.0. These pronunciation lexicons may be used as pronunciation hints when the document’s content is presented via text-to-speech. Where two or more pronunciation lexicons apply to the same text, the first match – as defined by the order of entries in the array and the order of entries inside the pronunciation lexicon file – is used.
See 14.9.6, "Pronunciation hints" for further discussion.

=head2 AF [array of dictionaries]
- (Optional; PDF 2.0) An array of one or more file specification dictionaries (7.11.3, "File specification dictionaries") which denote the associated files for the entire structure tree. See 14.13, "Associated files".

=end pod
