Next Up Previous Contents
Next: figurecontent-to-notation-map
Up: Common functions for the Starlink stylesheets
Previous: get-sysid-by-notation
[ID index][Keyword index]

get-best-figurecontent - Extract the `best' figure content.

Description

The FIGURE element has a content model which includes FIGURECONTENT*, PX*. Each of the FIGURECONTENT elements has an `image' and a `notation' attribute. If the `image' attribute is present, it refers to an entity which itself has a notation, and the element's content is that entity (the attribute has a CONREF default value). If that attribute is not present, then the element's content is the image, and the `notation' attribute should be present (it is an application error if it is not). This function should work through the list of elements it is presented, returning the first element which has a notation in (req-not), or the list of paragraphs if none matches. This merely returns the first match: if you have a hierarchy of preferences, then call the function repeatedly.

Argument list
nl = node-list (Given)

The list of FIGURECONTENT elements and paragraphs which is part of the content of the FIGURE element.

req-not = list of strings (Given)

A list of notations, as defined in the DTD.

Return value

Type: node-list

Either a selected figurecontent node, or the collection of paragraphs that follow them. Or (#f) if nothing works!


Next Up Previous Contents
Next: figurecontent-to-notation-map
Up: Common functions for the Starlink stylesheets
Previous: get-sysid-by-notation
[ID index][Keyword index]